From: Anna Wilcox Date: Fri, 20 Mar 2026 08:43:04 +0000 (-0500) Subject: examples: nft-rule-add: Fix compile on musl libc X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=HEAD;p=thirdparty%2Flibnftnl.git examples: nft-rule-add: Fix compile on musl libc Without `_GNU_SOURCE`, the `dest` field on `tcphdr` is not present: nft-rule-add.c: In function 'setup_rule': nft-rule-add.c:108:21: error: 'struct tcphdr' has no member named 'dest' Signed-off-by: Anna Wilcox Signed-off-by: Florian Westphal --- diff --git a/examples/nft-rule-add.c b/examples/nft-rule-add.c index 937b4366..486544ae 100644 --- a/examples/nft-rule-add.c +++ b/examples/nft-rule-add.c @@ -5,6 +5,7 @@ * This software has been sponsored by Sophos Astaro */ +#define _GNU_SOURCE /* for tcphdr.dest */ #include #include #include