Add two patches to make lms8 build with musl libc (both generic fixes, not musl specific).
Signed-off-by: Jussi Kukkonen <[email protected]> --- Note that I've not tested these properly: I'm not familiar enough with lms8 to do that. Jussi .../lms/0001-Include-sys-select.h-for-fd_set.patch | 28 +++++++++++++++++++ .../amt/lms/0002-Use-proper-netinet-in.h-API.patch | 31 ++++++++++++++++++++++ common/recipes-bsp/amt/lms8_8.0.0-7.bb | 2 ++ 3 files changed, 61 insertions(+) create mode 100644 common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch create mode 100644 common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch diff --git a/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch b/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch new file mode 100644 index 0000000..e28d45a --- /dev/null +++ b/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch @@ -0,0 +1,28 @@ +From 518a3a277c89a3d6b0a9d3ee552cfa33a1dbd5c6 Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <[email protected]> +Date: Mon, 23 Jan 2017 20:45:08 +0200 +Subject: [PATCH 1/2] Include sys/select.h for fd_set() + +This is needed at least on musl. + +Upstream-Status: Pending +Signed-off-by: Jussi Kukkonen <[email protected]> +--- + src/mei/MEILinux.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mei/MEILinux.cpp b/src/mei/MEILinux.cpp +index 1e9d28f..631270e 100755 +--- a/src/mei/MEILinux.cpp ++++ b/src/mei/MEILinux.cpp +@@ -37,6 +37,7 @@ + #include <cerrno> + #include <fcntl.h> + #include <sys/ioctl.h> ++#include <sys/select.h> + #include <unistd.h> + #include <stdint.h> + #include <aio.h> +-- +2.1.4 + diff --git a/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch b/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch new file mode 100644 index 0000000..fa2e29a --- /dev/null +++ b/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch @@ -0,0 +1,31 @@ +From 0adc925ca9e005f93d77f373ccda2a6c6cc3ff2f Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen <[email protected]> +Date: Mon, 23 Jan 2017 20:46:50 +0200 +Subject: [PATCH 2/2] Use proper netinet/in.h API + +in6addr is only guaranteed to contain this member: + uint8_t s6_addr[16] +Use that instead of the glibc implementation detail __in6_u. + +Upstream-Status: Pending +Signed-off-by: Jussi Kukkonen <[email protected]> +--- + src/tools/ATNetworkTool.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tools/ATNetworkTool.cpp b/src/tools/ATNetworkTool.cpp +index 66e27df..0789c79 100755 +--- a/src/tools/ATNetworkTool.cpp ++++ b/src/tools/ATNetworkTool.cpp +@@ -207,7 +207,7 @@ int ATNetworkTool::GetSockPeerIP(int sock, ATAddressList & peerAddresses, int &e + if(sa->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&addr)) //if(IN6_IS_ADDR_V4COMPAT(&addr)) + { + struct in_addr demapped_addr; +- memcpy(&demapped_addr.s_addr, &addr.__in6_u.__u6_addr8[12], 4); ++ memcpy(&demapped_addr.s_addr, &addr.s6_addr[12], 4); + + struct sockaddr_in sa_in; + sa_in.sin_family = AF_INET; +-- +2.1.4 + diff --git a/common/recipes-bsp/amt/lms8_8.0.0-7.bb b/common/recipes-bsp/amt/lms8_8.0.0-7.bb index 7989d59..842e34a 100644 --- a/common/recipes-bsp/amt/lms8_8.0.0-7.bb +++ b/common/recipes-bsp/amt/lms8_8.0.0-7.bb @@ -10,6 +10,8 @@ BPN="lms" SRC_URI = "http://software.intel.com/sites/default/files/${BPN}-${PV}.tar.gz \ file://readlink-declaration.patch \ file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \ + file://0001-Include-sys-select.h-for-fd_set.patch \ + file://0002-Use-proper-netinet-in.h-API.patch \ " COMPATIBLE_HOST = '(i.86|x86_64).*-linux' -- 2.1.4 -- _______________________________________________ meta-intel mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-intel
