summaryrefslogtreecommitdiff
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2017-01-23 18:00:16 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-26 10:41:10 +0000
commite6178138968717e1bdb7af7b5aed42fc74d956ab (patch)
treeed92aaf8542c8db97072f20cf8ccab77571e25ea /meta/recipes-connectivity
parent2e6ba167bee7c7b42b1e0e96eb5a7be2eb0fd2c0 (diff)
downloadopenembedded-core-e6178138968717e1bdb7af7b5aed42fc74d956ab.tar.gz
openembedded-core-e6178138968717e1bdb7af7b5aed42fc74d956ab.tar.bz2
openembedded-core-e6178138968717e1bdb7af7b5aed42fc74d956ab.zip
connman: Add workaround to build with musl & 4.9 headers
Kernel headers break when musl defines IFF_LOWER_UP. While waiting for more proper fix in musl, add a workaround to connman. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch64
-rw-r--r--meta/recipes-connectivity/connman/connman_1.33.bb3
2 files changed, 66 insertions, 1 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
new file mode 100644
index 0000000000..bf3b86d863
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch
@@ -0,0 +1,64 @@
+From c8bfad4ee9d2c505c00ccbb8b2139543b5ad6fcb Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Mon, 23 Jan 2017 17:41:39 +0200
+Subject: [PATCH] Fix compile on musl with kernel 4.9 headers
+
+Kernel headers break when musl defines IFF_LOWER_UP. While
+waiting for more proper fix in musl, add a hack to connman.
+
+Upstream-Status: Inappropriate [Workaround]
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ src/6to4.c | 4 ++++
+ src/firewall.c | 4 ++++
+ src/iptables.c | 4 ++++
+ 3 files changed, 12 insertions(+)
+
+diff --git a/src/6to4.c b/src/6to4.c
+index 71a2882..1938afb 100644
+--- a/src/6to4.c
++++ b/src/6to4.c
+@@ -24,6 +24,10 @@
+ #include <config.h>
+ #endif
+
++/* hack to make sure kernel headers understand that libc (musl)
++ does define IFF_LOWER_UP et al. */
++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
++
+ #include <errno.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+diff --git a/src/firewall.c b/src/firewall.c
+index c440df6..c83def9 100644
+--- a/src/firewall.c
++++ b/src/firewall.c
+@@ -23,6 +23,10 @@
+ #include <config.h>
+ #endif
+
++/* hack to make sure kernel headers understand that libc (musl)
++ does define IFF_LOWER_UP et al. */
++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
++
+ #include <errno.h>
+
+ #include <xtables.h>
+diff --git a/src/iptables.c b/src/iptables.c
+index 82e3ac4..46ad9e2 100644
+--- a/src/iptables.c
++++ b/src/iptables.c
+@@ -23,6 +23,10 @@
+ #include <config.h>
+ #endif
+
++/* hack to make sure kernel headers understand that libc (musl)
++ does define IFF_LOWER_UP et al. */
++#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0
++
+ #include <getopt.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+--
+2.1.4
+
diff --git a/meta/recipes-connectivity/connman/connman_1.33.bb b/meta/recipes-connectivity/connman/connman_1.33.bb
index 56a0a0fb23..4129b05bb5 100644
--- a/meta/recipes-connectivity/connman/connman_1.33.bb
+++ b/meta/recipes-connectivity/connman/connman_1.33.bb
@@ -7,7 +7,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
file://includes.patch \
file://0003-stats-Fix-bad-file-descriptor-initialisation.patch \
"
-SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"
+SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch \
+ file://0001-Fix-compile-on-musl-with-kernel-4.9-headers.patch"
SRC_URI[md5sum] = "c51903fd3e7a6a371d12ac5d72a1fa01"
SRC_URI[sha256sum] = "bc8946036fa70124d663136f9f6b6238d897ca482782df907b07a428b09df5a0"