From: Thomas Haller <thaller@redhat.com>
To: NetFilter <netfilter-devel@vger.kernel.org>
Cc: Thomas Haller <thaller@redhat.com>
Subject: [PATCH nft v2 4/6] configure: use AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE
Date: Fri, 25 Aug 2023 13:36:32 +0200 [thread overview]
Message-ID: <20230825113810.2620133-5-thaller@redhat.com> (raw)
In-Reply-To: <20230825113810.2620133-1-thaller@redhat.com>
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>
---
configure.ac | 3 +++
include/nft.h | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 42f0dc4cf392..baec66978847 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/include/nft.h b/include/nft.h
index 4e66f8e6470d..0fd481c6ef04 100644
--- a/include/nft.h
+++ b/include/nft.h
@@ -2,8 +2,6 @@
#ifndef NFTABLES_NFT_H
#define NFTABLES_NFT_H
-#define _GNU_SOURCE
-
#include <config.h>
#endif /* NFTABLES_NFT_H */
--
2.41.0
next prev parent reply other threads:[~2023-08-25 11:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 11:36 [PATCH nft v2 0/6] cleanup base includes and add <nft.h> header Thomas Haller
2023-08-25 11:36 ` [PATCH nft v2 1/6] meta: define _GNU_SOURCE to get strptime() from <time.h> Thomas Haller
2023-08-25 11:36 ` [PATCH nft v2 2/6] src: add <nft.h> header and include it as first Thomas Haller
2023-08-25 11:36 ` [PATCH nft v2 3/6] include: don't define _GNU_SOURCE in public header Thomas Haller
2023-08-25 11:36 ` Thomas Haller [this message]
2023-08-25 11:36 ` [PATCH nft v2 5/6] include: include <std{bool,int}.h> via <nft.h> Thomas Haller
2023-08-25 11:36 ` [PATCH nft v2 6/6] configure: drop AM_PROG_CC_C_O autoconf check Thomas Haller
2023-08-25 13:01 ` [PATCH nft v2 0/6] cleanup base includes and add <nft.h> header Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230825113810.2620133-5-thaller@redhat.com \
--to=thaller@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).