From: Thomas Haller <thaller@redhat.com>
To: NetFilter <netfilter-devel@vger.kernel.org>
Cc: Thomas Haller <thaller@redhat.com>
Subject: [PATCH nft 3/6] include: don't define _GNU_SOURCE in public header
Date: Thu, 24 Aug 2023 13:13:31 +0200 [thread overview]
Message-ID: <20230824111456.2005125-4-thaller@redhat.com> (raw)
In-Reply-To: <20230824111456.2005125-1-thaller@redhat.com>
_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>
---
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
next prev parent reply other threads:[~2023-08-24 11:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-24 11:13 [PATCH nft 0/6] cleanup base includes and add <nftdefault.h> header Thomas Haller
2023-08-24 11:13 ` [PATCH nft 1/6] meta: define _GNU_SOURCE to get strptime() from <time.h> Thomas Haller
2023-08-24 11:13 ` [PATCH nft 2/6] src: add <nftdefault.h> header and include it as first Thomas Haller
2023-08-24 11:13 ` Thomas Haller [this message]
2023-08-24 11:13 ` [PATCH nft 4/6] configure: use AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE Thomas Haller
2023-08-24 11:46 ` Thomas Haller
2023-08-24 11:13 ` [PATCH nft 5/6] include: include <std{bool,int}.h> via nftdefault.h Thomas Haller
2023-08-24 11:13 ` [PATCH nft 6/6] configure: drop AM_PROG_CC_C_O autoconf check Thomas Haller
2023-08-24 12:54 ` [PATCH nft 0/6] cleanup base includes and add <nftdefault.h> header Pablo Neira Ayuso
2023-08-24 13:18 ` Thomas Haller
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=20230824111456.2005125-4-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).