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]). Apparently 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@xxxxxxxxxx> --- configure.ac | 3 +++ include/nftdefault.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 42f0dc4cf392..9d859307adaa 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,9 @@ fi AM_PROG_AR LT_INIT([disable-static]) AM_PROG_CC_C_O + +AC_USE_SYSTEM_EXTENSIONS + AC_EXEEXT CHECK_GCC_FVISIBILITY diff --git a/include/nftdefault.h b/include/nftdefault.h index b7ebad7fddc0..0912cd188850 100644 --- a/include/nftdefault.h +++ b/include/nftdefault.h @@ -2,8 +2,6 @@ #ifndef NFTABLES_NFTDEFAULT_H #define NFTABLES_NFTDEFAULT_H -#define _GNU_SOURCE - #include <config.h> #endif /* NFTABLES_NFTDEFAULT_H */ -- 2.41.0