diff options
author | Rodrigo Rebello <rprebello@gmail.com> | 2015-11-23 02:59:49 -0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2015-11-23 15:44:11 +0100 |
commit | 992799ce27691e31ee0204483e83782b6922f189 (patch) | |
tree | 90390dac66cf28eade376283f5f037ad96e708c6 /src/helpers/rpc.c | |
parent | 77f9f09e5c2bf76d4b50850848e6db9f239f49c7 (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/rpc.c')
-rw-r--r-- | src/helpers/rpc.c | 1 |
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> |