[PATCH conntrack-tools] src: fix build with musl libc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 src/helpers/rpc.c | 1 +
 1 file changed, 1 insertion(+)

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>
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux