]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
include: don't define _GNU_SOURCE in public header
authorThomas Haller <thaller@redhat.com>
Fri, 25 Aug 2023 11:36:31 +0000 (13:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 25 Aug 2023 12:59:19 +0000 (14:59 +0200)
_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@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/nftables/libnftables.h

index cc05969215bc1fa85c91b04cd8579b50def1603b..c1d48d765a423f8ca5a48507e3353d9f8e3d1c5d 100644 (file)
@@ -9,7 +9,6 @@
 #ifndef LIB_NFTABLES_H
 #define LIB_NFTABLES_H
 
-#define _GNU_SOURCE
 #include <stdint.h>
 #include <stdio.h>
 #include <stdbool.h>