kumquat-buildroot/package/conntrack-tools/0001-src-fix-build-with-musl-libc.patch

38 lines
973 B
Diff
Raw Normal View History

From d7b20d9bbed23a7a7e40af2f5e78f37ff67e8d93 Mon Sep 17 00:00:00 2001
From: Rodrigo Rebello <rprebello@gmail.com>
Date: Mon, 23 Nov 2015 02:12:48 -0200
Subject: [PATCH] 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;
^
Upstream status: sent
http://patchwork.ozlabs.org/patch/547376/
Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
---
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