0001-src-fix-build-with-musl-libc.patch
973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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