From 3668ba76f44bc778ba4446236088c22948a644d0 Mon Sep 17 00:00:00 2001 From: André Draszik Date: Tue, 6 Mar 2018 11:01:53 +0200 Subject: openjdk-8: fix musl build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add various patches to make it work in musl. Some of them are generic enough to be applied for all builds, some need to be specific to musl. Signed-off-by: André Draszik Signed-off-by: Maxin B. John --- .../0007-jdk-use-correct-include-for-poll.patch | 172 +++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch (limited to 'recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch') diff --git a/recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch b/recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch new file mode 100644 index 0000000..af4dde9 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch @@ -0,0 +1,172 @@ +From df9c5738c4a8a00ba65948503ff0c0cfa2f17e95 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= > +Date: Tue, 27 Feb 2018 09:28:06 +0000 +Subject: [PATCH 7/9] jdk: use correct include for poll +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Compiling against musl-libc gives the following warning (which is +treated as error due to -Werror: +| In file included from jdk/src/solaris/native/java/net/net_util_md.h:36:0, +| from jdk/src/share/native/java/net/net_util.h:31, +| from jdk/src/solaris/native/java/net/InetAddressImplFactory.c:28: +| usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include to [-Wcpp] +| #warning redirecting incorrect #include to +| ^~~~~~~ +etc. + +To use poll(), poll.h needs to be included, even on glibc - do so using +the following command: + for i in $(git grep sys/poll\.h jdk | cut -f 1 -d : | sort -u) ; do + sed -e 's,sys/poll\.h,poll.h,g' -i ${i} + done + +Upstream-Status: Pending +Signed-off-by: André Draszik > +--- + jdk/src/aix/native/java/net/aix_close.c | 2 +- + jdk/src/aix/native/sun/nio/ch/AixPollPort.c | 2 +- + jdk/src/solaris/native/java/net/PlainSocketImpl.c | 2 +- + jdk/src/solaris/native/java/net/bsd_close.c | 2 +- + jdk/src/solaris/native/java/net/linux_close.c | 2 +- + jdk/src/solaris/native/java/net/net_util_md.h | 2 +- + jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c | 2 +- + jdk/src/solaris/native/sun/nio/ch/Net.c | 2 +- + jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c | 2 +- + jdk/src/solaris/transport/socket/socket_md.c | 2 +- + 10 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/jdk/src/aix/native/java/net/aix_close.c b/jdk/src/aix/native/java/net/aix_close.c +index 8c070e4b..126f4d7d 100644 +--- a/jdk/src/aix/native/java/net/aix_close.c ++++ b/jdk/src/aix/native/java/net/aix_close.c +@@ -51,7 +51,7 @@ + #include + #include + +-#include ++#include + + /* + * Stack allocated by thread when doing blocking operation +diff --git a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c +index 70064b89..c10c602b 100644 +--- a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c ++++ b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c +@@ -34,7 +34,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c +index 71cbdf8c..170957e7 100644 +--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c ++++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c +@@ -28,7 +28,7 @@ + #include + #include + #if defined(__linux__) && !defined(USE_SELECT) +-#include ++#include + #endif + #include /* Defines TCP_NODELAY, needed for 2.6 */ + #include +diff --git a/jdk/src/solaris/native/java/net/bsd_close.c b/jdk/src/solaris/native/java/net/bsd_close.c +index af57cef3..64d04088 100644 +--- a/jdk/src/solaris/native/java/net/bsd_close.c ++++ b/jdk/src/solaris/native/java/net/bsd_close.c +@@ -36,7 +36,7 @@ + #include + #include + #include +-#include ++#include + + /* + * Stack allocated by thread when doing blocking operation +diff --git a/jdk/src/solaris/native/java/net/linux_close.c b/jdk/src/solaris/native/java/net/linux_close.c +index 98e1ce09..85fba135 100644 +--- a/jdk/src/solaris/native/java/net/linux_close.c ++++ b/jdk/src/solaris/native/java/net/linux_close.c +@@ -34,7 +34,7 @@ + #include + #include + #include +-#include ++#include + + /* + * Stack allocated by thread when doing blocking operation +diff --git a/jdk/src/solaris/native/java/net/net_util_md.h b/jdk/src/solaris/native/java/net/net_util_md.h +index a48446de..8915b68a 100644 +--- a/jdk/src/solaris/native/java/net/net_util_md.h ++++ b/jdk/src/solaris/native/java/net/net_util_md.h +@@ -33,7 +33,7 @@ + #include + + #ifndef USE_SELECT +-#include ++#include + #endif + + +diff --git a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c +index 6860a167..20849dab 100644 +--- a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c ++++ b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c +@@ -28,7 +28,7 @@ + #include "jvm.h" + #include "jlong.h" + #include "sun_nio_ch_DevPollArrayWrapper.h" +-#include ++#include + #include + #include + +diff --git a/jdk/src/solaris/native/sun/nio/ch/Net.c b/jdk/src/solaris/native/sun/nio/ch/Net.c +index 73560ad6..a3720055 100644 +--- a/jdk/src/solaris/native/sun/nio/ch/Net.c ++++ b/jdk/src/solaris/native/sun/nio/ch/Net.c +@@ -23,7 +23,7 @@ + * questions. + */ + +-#include ++#include + #include + #include + #include +diff --git a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c +index 375aaa48..7606e9ba 100644 +--- a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c ++++ b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c +@@ -32,7 +32,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include "sun_nio_fs_LinuxWatchService.h" +diff --git a/jdk/src/solaris/transport/socket/socket_md.c b/jdk/src/solaris/transport/socket/socket_md.c +index 33e062e0..819fcabd 100644 +--- a/jdk/src/solaris/transport/socket/socket_md.c ++++ b/jdk/src/solaris/transport/socket/socket_md.c +@@ -37,7 +37,7 @@ + #include + #else + #include +-#include ++#include + #endif + + #include "socket_md.h" +-- +2.16.2 + -- cgit v1.2.3-54-g00ecf