Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit bd190ea

Browse files
committed
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
1 parent d611517 commit bd190ea

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

contrib/sepgsql/label.c

+10-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@
1010
*/
1111
#include "postgres.h"
1212

13+
#include <selinux/label.h>
14+
15+
/*
16+
* <selinux/label.h> includes <stdbool.h>, which creates an incompatible
17+
* #define for bool. Get rid of that so we can use our own typedef.
18+
* (We don't care if <stdbool.h> redefines "true"/"false"; those are close
19+
* enough.)
20+
*/
21+
#undef bool
22+
1323
#include "access/heapam.h"
1424
#include "access/htup_details.h"
1525
#include "access/genam.h"
@@ -37,8 +47,6 @@
3747

3848
#include "sepgsql.h"
3949

40-
#include <selinux/label.h>
41-
4250
/*
4351
* Saved hook entries (if stacked)
4452
*/

0 commit comments

Comments
 (0)