[PATCH 3/4] build: avoid inclusion of stdbool.h in C++

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



C++ does not need this header, as it already has bool builtin.

Signed-off-by: Jan Engelhardt <jengelh@xxxxxxx>
---
 include/libnftables/chain.h   | 4 +++-
 include/libnftables/expr.h    | 4 +++-
 include/libnftables/rule.h    | 4 +++-
 include/libnftables/ruleset.h | 4 +++-
 include/libnftables/set.h     | 4 +++-
 include/libnftables/table.h   | 4 +++-
 6 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/include/libnftables/chain.h b/include/libnftables/chain.h
index d3ba75b..13b037d 100644
--- a/include/libnftables/chain.h
+++ b/include/libnftables/chain.h
@@ -2,7 +2,9 @@
 #define _CHAIN_H_
 
 #include <stdint.h>
-#include <stdbool.h>
+#ifndef __cplusplus
+#	include <stdbool.h>
+#endif
 #include <sys/types.h>
 
 #ifdef __cplusplus
diff --git a/include/libnftables/expr.h b/include/libnftables/expr.h
index 81e224c..d5f13a6 100644
--- a/include/libnftables/expr.h
+++ b/include/libnftables/expr.h
@@ -2,7 +2,9 @@
 #define _RULE_EXPR_H_
 
 #include <stdint.h>
-#include <stdbool.h>
+#ifndef __cplusplus
+#	include <stdbool.h>
+#endif
 #include <sys/types.h>
 
 #ifdef __cplusplus
diff --git a/include/libnftables/rule.h b/include/libnftables/rule.h
index 5b5263a..cb71e49 100644
--- a/include/libnftables/rule.h
+++ b/include/libnftables/rule.h
@@ -2,7 +2,9 @@
 #define _RULE_H_
 
 #include <stdint.h>
-#include <stdbool.h>
+#ifndef __cplusplus
+#	include <stdbool.h>
+#endif
 #include <sys/types.h>
 
 #ifdef __cplusplus
diff --git a/include/libnftables/ruleset.h b/include/libnftables/ruleset.h
index 49f7c4e..96ff425 100644
--- a/include/libnftables/ruleset.h
+++ b/include/libnftables/ruleset.h
@@ -1,7 +1,9 @@
 #ifndef _RULESET_H_
 #define _RULESET_H_
 
-#include <stdbool.h>
+#ifndef __cplusplus
+#	include <stdbool.h>
+#endif
 #include <stdint.h>
 #include <sys/types.h>
 
diff --git a/include/libnftables/set.h b/include/libnftables/set.h
index 1bd7670..92af85c 100644
--- a/include/libnftables/set.h
+++ b/include/libnftables/set.h
@@ -2,7 +2,9 @@
 #define _NFT_SET_H_
 
 #include <stdint.h>
-#include <stdbool.h>
+#ifndef __cplusplus
+#	include <stdbool.h>
+#endif
 #include <sys/types.h>
 
 enum {
diff --git a/include/libnftables/table.h b/include/libnftables/table.h
index 86978e1..b91a457 100644
--- a/include/libnftables/table.h
+++ b/include/libnftables/table.h
@@ -2,7 +2,9 @@
 #define _TABLE_H_
 
 #include <stdint.h>
-#include <stdbool.h>
+#ifndef __cplusplus
+#	include <stdbool.h>
+#endif
 #include <sys/types.h>
 
 #ifdef __cplusplus
-- 
1.8.2

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux