summaryrefslogtreecommitdiffstats
path: root/include/nftables/libnftables.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-08-25 13:36:31 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-08-25 14:59:19 +0200
commit1702252b03d5a25287bb53a519b94284b09f7cdc (patch)
tree70479cb019501821ab65bf96437f82f28a32b12e /include/nftables/libnftables.h
parentb4add075c1283151d0514cf0052f9184e9e073df (diff)
include: don't define _GNU_SOURCE in public header
_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>
Diffstat (limited to 'include/nftables/libnftables.h')
-rw-r--r--include/nftables/libnftables.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/nftables/libnftables.h b/include/nftables/libnftables.h
index cc059692..c1d48d76 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>