summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch b/recipes-core/openjdk/patches-openjdk-8/musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch
new file mode 100644
index 0000000..c15895f
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/musl-0008-jdk-musl-build-fix-use-SIGRTMAX-rather-than-__SIGRTM.patch
@@ -0,0 +1,69 @@
1From ec37e9e5663611e49c7c976d34450ea6b90d0f24 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
3Date: Fri, 2 Mar 2018 13:37:20 +0000
4Subject: [PATCH 8/9] jdk: musl build fix (use SIGRTMAX rather than __SIGRTMAX)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9__SIGRTMAX is a private glibc symbol, which isn't provided
10by musl, thus failing compilation.
11
12From https://sourceware.org/ml/rda/2005-q4/msg00011.html
13 On a GNU(ish) system, [SIGRTMIN / SIGRTMAX] these macros are defined
14 to call functions which compute the actual minimum and maximum
15 realtime signal numbers. In particular, this computation will exclude
16 any signals used by the C library for its own purposes. These signals
17 could include signals related to thread debugging or, more
18 importantly, for thread cancellation.
19[...]
20 [The __SIGRTMIN and __SIGRTMAX] constants represent a hard minumum
21 and maximum.
22
23Patch taken from Alpine Linux:
24 https://git.alpinelinux.org/cgit/aports/tree/community/openjdk8/icedtea-jdk-musl.patch?id=4d34f29dddd3934358df7a9607706d09ae0433c3
25
26Upstream-Status: Inappropriate [musl specific]
27Signed-off-by: André Draszik <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
28---
29 jdk/src/solaris/native/java/net/linux_close.c | 3 ++-
30 jdk/src/solaris/native/sun/nio/ch/NativeThread.c | 2 +-
31 2 files changed, 3 insertions(+), 2 deletions(-)
32
33diff --git a/jdk/src/solaris/native/java/net/linux_close.c b/jdk/src/solaris/native/java/net/linux_close.c
34index 85fba135..e635dafd 100644
35--- a/jdk/src/solaris/native/java/net/linux_close.c
36+++ b/jdk/src/solaris/native/java/net/linux_close.c
37@@ -56,7 +56,7 @@ typedef struct {
38 /*
39 * Signal to unblock thread
40 */
41-static int sigWakeup = (__SIGRTMAX - 2);
42+static int sigWakeup;
43
44 /*
45 * The fd table and the number of file descriptors
46@@ -95,6 +95,7 @@ static void __attribute((constructor)) init() {
47 /*
48 * Setup the signal handler
49 */
50+ sigWakeup = SIGRTMAX - 2;
51 sa.sa_handler = sig_wakeup;
52 sa.sa_flags = 0;
53 sigemptyset(&sa.sa_mask);
54diff --git a/jdk/src/solaris/native/sun/nio/ch/NativeThread.c b/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
55index 204f0441..f5483bbd 100644
56--- a/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
57+++ b/jdk/src/solaris/native/sun/nio/ch/NativeThread.c
58@@ -36,7 +36,7 @@
59 #include <pthread.h>
60 #include <signal.h>
61 /* Also defined in net/linux_close.c */
62- #define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
63+ #define INTERRUPT_SIGNAL (SIGRTMAX - 2)
64 #elif __solaris__
65 #include <thread.h>
66 #include <signal.h>
67--
682.16.2
69