summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch')
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch37
1 files changed, 27 insertions, 10 deletions
diff --git a/meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch b/meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch
index bf3b86d863..da5756e9d5 100644
--- a/meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch
+++ b/meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch
@@ -1,4 +1,4 @@
1From c8bfad4ee9d2c505c00ccbb8b2139543b5ad6fcb Mon Sep 17 00:00:00 2001 1From 594b67df7ca923d13265906a71fbbf748273a5f5 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com> 2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Mon, 23 Jan 2017 17:41:39 +0200 3Date: Mon, 23 Jan 2017 17:41:39 +0200
4Subject: [PATCH] Fix compile on musl with kernel 4.9 headers 4Subject: [PATCH] Fix compile on musl with kernel 4.9 headers
@@ -7,12 +7,15 @@ Kernel headers break when musl defines IFF_LOWER_UP. While
7waiting for more proper fix in musl, add a hack to connman. 7waiting for more proper fix in musl, add a hack to connman.
8 8
9Upstream-Status: Inappropriate [Workaround] 9Upstream-Status: Inappropriate [Workaround]
10
10Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 11Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
12Signed-off-by: Maxin B. John <maxin.john@intel.com>
11--- 13---
12 src/6to4.c | 4 ++++ 14 src/6to4.c | 4 ++++
13 src/firewall.c | 4 ++++ 15 src/firewall-iptables.c | 4 ++++
14 src/iptables.c | 4 ++++ 16 src/firewall-nftables.c | 3 +++
15 3 files changed, 12 insertions(+) 17 src/iptables.c | 4 ++++
18 4 files changed, 15 insertions(+)
16 19
17diff --git a/src/6to4.c b/src/6to4.c 20diff --git a/src/6to4.c b/src/6to4.c
18index 71a2882..1938afb 100644 21index 71a2882..1938afb 100644
@@ -29,10 +32,10 @@ index 71a2882..1938afb 100644
29 #include <errno.h> 32 #include <errno.h>
30 #include <stdio.h> 33 #include <stdio.h>
31 #include <stdlib.h> 34 #include <stdlib.h>
32diff --git a/src/firewall.c b/src/firewall.c 35diff --git a/src/firewall-iptables.c b/src/firewall-iptables.c
33index c440df6..c83def9 100644 36index 45943a8..e04bb91 100644
34--- a/src/firewall.c 37--- a/src/firewall-iptables.c
35+++ b/src/firewall.c 38+++ b/src/firewall-iptables.c
36@@ -23,6 +23,10 @@ 39@@ -23,6 +23,10 @@
37 #include <config.h> 40 #include <config.h>
38 #endif 41 #endif
@@ -44,6 +47,20 @@ index c440df6..c83def9 100644
44 #include <errno.h> 47 #include <errno.h>
45 48
46 #include <xtables.h> 49 #include <xtables.h>
50diff --git a/src/firewall-nftables.c b/src/firewall-nftables.c
51index 2503ee2..583d1c4 100644
52--- a/src/firewall-nftables.c
53+++ b/src/firewall-nftables.c
54@@ -30,6 +30,9 @@
55 #ifdef HAVE_CONFIG_H
56 #include <config.h>
57 #endif
58+/* hack to make sure kernel headers understand that libc (musl)
59+ does define IFF_LOWER_UP et al. */
60+#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
61
62 #include <stdlib.h>
63 #include <time.h>
47diff --git a/src/iptables.c b/src/iptables.c 64diff --git a/src/iptables.c b/src/iptables.c
48index 82e3ac4..46ad9e2 100644 65index 82e3ac4..46ad9e2 100644
49--- a/src/iptables.c 66--- a/src/iptables.c
@@ -60,5 +77,5 @@ index 82e3ac4..46ad9e2 100644
60 #include <stdlib.h> 77 #include <stdlib.h>
61 #include <stdio.h> 78 #include <stdio.h>
62-- 79--
632.1.4 802.4.0
64 81