]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
configure: use AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE
authorThomas Haller <thaller@redhat.com>
Fri, 25 Aug 2023 11:36:32 +0000 (13:36 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 25 Aug 2023 12:59:19 +0000 (14:59 +0200)
Let "configure" detect which features are available. Also, nftables is a
Linux project, so portability beyond gcc/clang and glibc/musl is less
relevant. And even if it were, then feature detection by "configure"
would still be preferable.

Use AC_USE_SYSTEM_EXTENSIONS ([1]).

Available since autoconf 2.60, from 2006 ([2]).

[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Posix-Variants.html#index-AC_005fUSE_005fSYSTEM_005fEXTENSIONS-1046
[2] https://lists.gnu.org/archive/html/autoconf/2006-06/msg00111.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
configure.ac
include/nft.h

index 42f0dc4cf3920aa0d44cf2ede51e47b371f97b1b..baec66978847bafee6308955954d28780db73ba7 100644 (file)
@@ -23,6 +23,9 @@ AM_CONDITIONAL([BUILD_MAN], [test "x$enable_man_doc" = "xyes" ])
 
 # Checks for programs.
 AC_PROG_CC
+
+AC_USE_SYSTEM_EXTENSIONS
+
 AC_PROG_MKDIR_P
 AC_PROG_INSTALL
 AC_PROG_SED
index 4e66f8e6470d2c2742357537cf24a3b37ebbef6c..0fd481c6ef04095b3e0191f793b7fb1edfdd82ef 100644 (file)
@@ -2,8 +2,6 @@
 #ifndef NFTABLES_NFT_H
 #define NFTABLES_NFT_H
 
-#define _GNU_SOURCE
-
 #include <config.h>
 
 #endif /* NFTABLES_NFT_H */