diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c
index 1a8f884..320c098 100644
*** a/contrib/sepgsql/label.c
--- b/contrib/sepgsql/label.c
***************
*** 10,15 ****
--- 10,25 ----
   */
  #include "postgres.h"
  
+ #include <selinux/label.h>
+ /*
+  * selinux/label.h includes stdbool.h, which redefines bool, so
+  * revert to the postgres definition of bool from c.h
+  */
+ #ifdef bool
+ #undef bool
+ typedef char bool;
+ #endif
+ 
  #include "access/heapam.h"
  #include "access/htup_details.h"
  #include "access/genam.h"
***************
*** 37,44 ****
  
  #include "sepgsql.h"
  
- #include <selinux/label.h>
- 
  /*
   * Saved hook entries (if stacked)
   */
--- 47,52 ----
