summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2018-03-06 11:01:53 +0200
committerMaxin B. John <maxin.john@intel.com>2018-03-06 11:03:09 +0200
commit3668ba76f44bc778ba4446236088c22948a644d0 (patch)
treecc3291774f0e41350f22a1e5e0196e08f14500a3 /recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch
parentf8be3065f7c5dbd73516394c0bcd2c7ba1777abf (diff)
downloadmeta-java-3668ba76f44bc778ba4446236088c22948a644d0.tar.gz
openjdk-8: fix musl build
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 <andre.draszik@jci.com> Signed-off-by: Maxin B. John <maxin.john@intel.com>
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch b/recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch
new file mode 100644
index 0000000..086f669
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/musl-0004-jdk-remove-sysctl.h-include-musl-build-fix.patch
@@ -0,0 +1,90 @@
1From 86945e6df4dc15d5c2402a656d1d9d1b25945fb2 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: Tue, 27 Feb 2018 09:28:06 +0000
4Subject: [PATCH 4/9] jdk: remove sysctl.h include (musl build fix)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Compiling against musl-libc gives the following warning (which is
10treated as error due to -Werror:
11| jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c:44:10: fatal error: sys/sysctl.h: No such file or directory
12| #include <sys/sysctl.h>
13| ^~~~~~~~~~~~~~
14etc.
15
16Remove it, at things seem to work without as well.
17
18Upstream-Status: Inappropriate [musl specific]
19Signed-off-by: André Draszik <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
20---
21 jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c | 1 -
22 jdk/src/solaris/native/java/net/PlainSocketImpl.c | 1 -
23 jdk/src/solaris/native/java/net/net_util_md.c | 1 -
24 jdk/src/solaris/native/sun/management/OperatingSystemImpl.c | 1 -
25 jdk/src/solaris/native/sun/net/portconfig.c | 1 -
26 5 files changed, 5 deletions(-)
27
28diff --git a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
29index c48d1153..e3519774 100644
30--- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
31+++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
32@@ -41,7 +41,6 @@
33 #endif
34 #ifdef __linux__
35 #include <unistd.h>
36-#include <sys/sysctl.h>
37 #include <sys/utsname.h>
38 #include <netinet/ip.h>
39
40diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
41index 170957e7..9aafbc09 100644
42--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
43+++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
44@@ -43,7 +43,6 @@
45 #endif
46 #ifdef __linux__
47 #include <unistd.h>
48-#include <sys/sysctl.h>
49 #endif
50
51 #include "jvm.h"
52diff --git a/jdk/src/solaris/native/java/net/net_util_md.c b/jdk/src/solaris/native/java/net/net_util_md.c
53index eae347cf..a0ba6be0 100644
54--- a/jdk/src/solaris/native/java/net/net_util_md.c
55+++ b/jdk/src/solaris/native/java/net/net_util_md.c
56@@ -40,7 +40,6 @@
57 #else
58 #include <limits.h>
59 #include <sys/param.h>
60-#include <sys/sysctl.h>
61 #ifndef MAXINT
62 #define MAXINT INT_MAX
63 #endif
64diff --git a/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c b/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c
65index aa21f019..0b895569 100644
66--- a/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c
67+++ b/jdk/src/solaris/native/sun/management/OperatingSystemImpl.c
68@@ -33,7 +33,6 @@
69 #include <sys/types.h>
70 #include <sys/stat.h>
71 #if defined(_ALLBSD_SOURCE)
72-#include <sys/sysctl.h>
73 #ifdef __APPLE__
74 #include <sys/param.h>
75 #include <sys/mount.h>
76diff --git a/jdk/src/solaris/native/sun/net/portconfig.c b/jdk/src/solaris/native/sun/net/portconfig.c
77index 56730f0f..5209c828 100644
78--- a/jdk/src/solaris/native/sun/net/portconfig.c
79+++ b/jdk/src/solaris/native/sun/net/portconfig.c
80@@ -29,7 +29,6 @@
81 #include <errno.h>
82
83 #if defined(_ALLBSD_SOURCE)
84-#include <sys/sysctl.h>
85 #endif
86
87 #include "jni.h"
88--
892.16.2
90