summaryrefslogtreecommitdiff
path: root/contrib/sepgsql/label.c
diff options
context:
space:
mode:
authorJoe Conway <mail@joeconway.com>2017-04-06 14:21:54 -0700
committerJoe Conway <mail@joeconway.com>2017-04-06 14:24:50 -0700
commit649cd9085efb2cb4e21eec3b3861f46e89ba3a34 (patch)
treee3b5867c1f4f8758fc9aa44610a25d5990854b94 /contrib/sepgsql/label.c
parentc2f08c6429457a92c99906e5fa56069c57fbe3f2 (diff)
Silence compiler warning in sepgsql
<selinux/label.h> includes <stdbool.h>, which creates an incompatible We don't care if <stdbool.h> redefines "true"/"false"; those are close enough. Complaint and initial patch by Mike Palmiotto. Final approach per Tom Lane's suggestion, as discussed on hackers. Backpatching to all supported branches. Discussion: https://postgr.es/m/flat/623bcaae-112e-ced0-8c22-a84f75ae0c53%40joeconway.com
Diffstat (limited to 'contrib/sepgsql/label.c')
-rw-r--r--contrib/sepgsql/label.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c
index 7cd4f67ae10..4dce097e383 100644
--- a/contrib/sepgsql/label.c
+++ b/contrib/sepgsql/label.c
@@ -10,6 +10,16 @@
*/
#include "postgres.h"
+#include <selinux/label.h>
+
+/*
+ * <selinux/label.h> includes <stdbool.h>, which creates an incompatible
+ * #define for bool. Get rid of that so we can use our own typedef.
+ * (We don't care if <stdbool.h> redefines "true"/"false"; those are close
+ * enough.)
+ */
+#undef bool
+
#include "access/heapam.h"
#include "access/htup_details.h"
#include "access/genam.h"
@@ -37,8 +47,6 @@
#include "sepgsql.h"
-#include <selinux/label.h>
-
/*
* Saved hook entries (if stacked)
*/