summaryrefslogtreecommitdiffstats
path: root/src/helpers
diff options
context:
space:
mode:
authorRodrigo Rebello <rprebello@gmail.com>2015-11-23 02:59:49 -0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-11-23 15:44:11 +0100
commit992799ce27691e31ee0204483e83782b6922f189 (patch)
tree90390dac66cf28eade376283f5f037ad96e708c6 /src/helpers
parent77f9f09e5c2bf76d4b50850848e6db9f239f49c7 (diff)
src: fix build with musl libc
The GNU version of 'struct tcphdr' is not exposed by musl libc headers unless _GNU_SOURCE is defined. Without this definition, the build fails with: rpc.c: In function 'rpc_helper_cb': rpc.c:351:15: error: 'struct tcphdr' has no member named 'doff' offset += th->doff * 4; ^ Signed-off-by: Rodrigo Rebello <rprebello@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/rpc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/helpers/rpc.c b/src/helpers/rpc.c
index 82493c2..3a7b337 100644
--- a/src/helpers/rpc.c
+++ b/src/helpers/rpc.c
@@ -28,6 +28,7 @@
#include <rpc/rpc_msg.h>
#include <rpc/pmap_prot.h>
+#define _GNU_SOURCE
#include <netinet/tcp.h>
#include <netinet/udp.h>