diff options
author | Jussi Kukkonen <jussi.kukkonen@intel.com> | 2017-01-24 11:06:32 +0200 |
---|---|---|
committer | California Sullivan <california.l.sullivan@intel.com> | 2017-01-24 17:26:41 -0800 |
commit | b7ef51cf8edb61421e56d105f28f3506bb25401e (patch) | |
tree | 2781e6a2772ac4ef488722a6bbc5d8e19b4343cb | |
parent | c92e40dcd34726aeb32b7a420c2ad8fc98e02e98 (diff) | |
download | meta-intel-b7ef51cf8edb61421e56d105f28f3506bb25401e.tar.gz |
lms8: Fix build on musl
Add two patches to make lms8 build with musl libc (both generic fixes,
not musl specific).
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
3 files changed, 61 insertions, 0 deletions
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 00000000..e28d45ac --- /dev/null +++ b/common/recipes-bsp/amt/lms/0001-Include-sys-select.h-for-fd_set.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 518a3a277c89a3d6b0a9d3ee552cfa33a1dbd5c6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 20:45:08 +0200 | ||
4 | Subject: [PATCH 1/2] Include sys/select.h for fd_set() | ||
5 | |||
6 | This is needed at least on musl. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
10 | --- | ||
11 | src/mei/MEILinux.cpp | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/src/mei/MEILinux.cpp b/src/mei/MEILinux.cpp | ||
15 | index 1e9d28f..631270e 100755 | ||
16 | --- a/src/mei/MEILinux.cpp | ||
17 | +++ b/src/mei/MEILinux.cpp | ||
18 | @@ -37,6 +37,7 @@ | ||
19 | #include <cerrno> | ||
20 | #include <fcntl.h> | ||
21 | #include <sys/ioctl.h> | ||
22 | +#include <sys/select.h> | ||
23 | #include <unistd.h> | ||
24 | #include <stdint.h> | ||
25 | #include <aio.h> | ||
26 | -- | ||
27 | 2.1.4 | ||
28 | |||
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 00000000..fa2e29a5 --- /dev/null +++ b/common/recipes-bsp/amt/lms/0002-Use-proper-netinet-in.h-API.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 0adc925ca9e005f93d77f373ccda2a6c6cc3ff2f Mon Sep 17 00:00:00 2001 | ||
2 | From: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
3 | Date: Mon, 23 Jan 2017 20:46:50 +0200 | ||
4 | Subject: [PATCH 2/2] Use proper netinet/in.h API | ||
5 | |||
6 | in6addr is only guaranteed to contain this member: | ||
7 | uint8_t s6_addr[16] | ||
8 | Use that instead of the glibc implementation detail __in6_u. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
12 | --- | ||
13 | src/tools/ATNetworkTool.cpp | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/src/tools/ATNetworkTool.cpp b/src/tools/ATNetworkTool.cpp | ||
17 | index 66e27df..0789c79 100755 | ||
18 | --- a/src/tools/ATNetworkTool.cpp | ||
19 | +++ b/src/tools/ATNetworkTool.cpp | ||
20 | @@ -207,7 +207,7 @@ int ATNetworkTool::GetSockPeerIP(int sock, ATAddressList & peerAddresses, int &e | ||
21 | if(sa->sa_family == AF_INET6 && IN6_IS_ADDR_V4MAPPED(&addr)) //if(IN6_IS_ADDR_V4COMPAT(&addr)) | ||
22 | { | ||
23 | struct in_addr demapped_addr; | ||
24 | - memcpy(&demapped_addr.s_addr, &addr.__in6_u.__u6_addr8[12], 4); | ||
25 | + memcpy(&demapped_addr.s_addr, &addr.s6_addr[12], 4); | ||
26 | |||
27 | struct sockaddr_in sa_in; | ||
28 | sa_in.sin_family = AF_INET; | ||
29 | -- | ||
30 | 2.1.4 | ||
31 | |||
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 7989d59e..842e34a0 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" | |||
10 | SRC_URI = "http://software.intel.com/sites/default/files/${BPN}-${PV}.tar.gz \ | 10 | SRC_URI = "http://software.intel.com/sites/default/files/${BPN}-${PV}.tar.gz \ |
11 | file://readlink-declaration.patch \ | 11 | file://readlink-declaration.patch \ |
12 | file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \ | 12 | file://0001-Protocol.cpp-Add-whitespace-for-gcc6-compile-error.patch \ |
13 | file://0001-Include-sys-select.h-for-fd_set.patch \ | ||
14 | file://0002-Use-proper-netinet-in.h-API.patch \ | ||
13 | " | 15 | " |
14 | 16 | ||
15 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' | 17 | COMPATIBLE_HOST = '(i.86|x86_64).*-linux' |