postgres.git / summary / log / commit / refs

commit    dd93afca3a0a4c18ac17ee14f7874994f4ced9b5
Author:   Joe Conway <mail@joeconway.com>
Date:     Thu Apr 06 21:21:31 2017 +0000
First released in: 10.0, 9.2.21, 9.3.17, 9.4.12, 9.5.7, 9.6.3

    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


contrib/sepgsql/label.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/contrib/sepgsql/label.c b/contrib/sepgsql/label.c index e12a0e8cb66..ba6f5cdcef5 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) */ [parent: b3721f7d13aa]