[PATCH nft 3/6] include: don't define _GNU_SOURCE in public header

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

 



_GNU_SOURCE is supposed to be defined as first thing, before including any
libc headers. Defining it in the public header of nftables is wrong, because
it would only (somewhat) work if the user includes the nftables header as first
thing too. But that is not what users commonly would do, in particular with
autotools projects, where users would include <config.h> first.

It's also unnecessary. Nothing in "nftables/libnftables.h" itself
requires _GNU_SOURCE. Drop it.

Signed-off-by: Thomas Haller <thaller@xxxxxxxxxx>
---
 include/nftables/libnftables.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/nftables/libnftables.h b/include/nftables/libnftables.h
index cc05969215bc..c1d48d765a42 100644
--- a/include/nftables/libnftables.h
+++ b/include/nftables/libnftables.h
@@ -9,7 +9,6 @@
 #ifndef LIB_NFTABLES_H
 #define LIB_NFTABLES_H
 
-#define _GNU_SOURCE
 #include <stdint.h>
 #include <stdio.h>
 #include <stdbool.h>
-- 
2.41.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux