From 2c8e251ef83d0b8d0145c2cebd77edec538f1c85 Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Thu, 2 Mar 2017 09:35:07 +0200 Subject: utils: nfsynproxy: fix build with musl libc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The musl libc exposes some struct tcphdr field only when _GNU_SOURCE is defined. Fix the following build failure: nfsynproxy.c: In function ‘parse_packet’: nfsynproxy.c:34:9: error: ‘const struct tcphdr’ has no member named ‘syn’ if (!th->syn || !th->ack) ^ nfsynproxy.c:34:21: error: ‘const struct tcphdr’ has no member named ‘ack’ if (!th->syn || !th->ack) ^ nfsynproxy.c:42:8: error: ‘const struct tcphdr’ has no member named ‘res2’ if (th->res2 == 0x1) ^ nfsynproxy.c:45:13: error: ‘const struct tcphdr’ has no member named ‘doff’ length = th->doff * 4 - sizeof(*th); ^ Signed-off-by: Baruch Siach Signed-off-by: Pablo Neira Ayuso --- utils/nfsynproxy.c | 1 + 1 file changed, 1 insertion(+) (limited to 'utils') diff --git a/utils/nfsynproxy.c b/utils/nfsynproxy.c index baedc92c..bf5c4163 100644 --- a/utils/nfsynproxy.c +++ b/utils/nfsynproxy.c @@ -6,6 +6,7 @@ * published by the Free Software Foundation. */ +#define _GNU_SOURCE #include #include #include -- cgit v1.2.3