summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch172
1 files changed, 172 insertions, 0 deletions
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 @@
1From df9c5738c4a8a00ba65948503ff0c0cfa2f17e95 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 7/9] jdk: use correct include for poll
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| In file included from jdk/src/solaris/native/java/net/net_util_md.h:36:0,
12| from jdk/src/share/native/java/net/net_util.h:31,
13| from jdk/src/solaris/native/java/net/InetAddressImplFactory.c:28:
14| usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
15| #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
16| ^~~~~~~
17etc.
18
19To use poll(), poll.h needs to be included, even on glibc - do so using
20the following command:
21 for i in $(git grep sys/poll\.h jdk | cut -f 1 -d : | sort -u) ; do
22 sed -e 's,sys/poll\.h,poll.h,g' -i ${i}
23 done
24
25Upstream-Status: Pending
26Signed-off-by: André Draszik <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
27---
28 jdk/src/aix/native/java/net/aix_close.c | 2 +-
29 jdk/src/aix/native/sun/nio/ch/AixPollPort.c | 2 +-
30 jdk/src/solaris/native/java/net/PlainSocketImpl.c | 2 +-
31 jdk/src/solaris/native/java/net/bsd_close.c | 2 +-
32 jdk/src/solaris/native/java/net/linux_close.c | 2 +-
33 jdk/src/solaris/native/java/net/net_util_md.h | 2 +-
34 jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c | 2 +-
35 jdk/src/solaris/native/sun/nio/ch/Net.c | 2 +-
36 jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c | 2 +-
37 jdk/src/solaris/transport/socket/socket_md.c | 2 +-
38 10 files changed, 10 insertions(+), 10 deletions(-)
39
40diff --git a/jdk/src/aix/native/java/net/aix_close.c b/jdk/src/aix/native/java/net/aix_close.c
41index 8c070e4b..126f4d7d 100644
42--- a/jdk/src/aix/native/java/net/aix_close.c
43+++ b/jdk/src/aix/native/java/net/aix_close.c
44@@ -51,7 +51,7 @@
45 #include <unistd.h>
46 #include <errno.h>
47
48-#include <sys/poll.h>
49+#include <poll.h>
50
51 /*
52 * Stack allocated by thread when doing blocking operation
53diff --git a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
54index 70064b89..c10c602b 100644
55--- a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
56+++ b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
57@@ -34,7 +34,7 @@
58 #include <unistd.h>
59 #include <sys/types.h>
60 #include <sys/socket.h>
61-#include <sys/poll.h>
62+#include <poll.h>
63 #include <sys/pollset.h>
64 #include <fcntl.h>
65 #include <stddef.h>
66diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
67index 71cbdf8c..170957e7 100644
68--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
69+++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
70@@ -28,7 +28,7 @@
71 #include <sys/types.h>
72 #include <sys/socket.h>
73 #if defined(__linux__) && !defined(USE_SELECT)
74-#include <sys/poll.h>
75+#include <poll.h>
76 #endif
77 #include <netinet/tcp.h> /* Defines TCP_NODELAY, needed for 2.6 */
78 #include <netinet/in.h>
79diff --git a/jdk/src/solaris/native/java/net/bsd_close.c b/jdk/src/solaris/native/java/net/bsd_close.c
80index af57cef3..64d04088 100644
81--- a/jdk/src/solaris/native/java/net/bsd_close.c
82+++ b/jdk/src/solaris/native/java/net/bsd_close.c
83@@ -36,7 +36,7 @@
84 #include <sys/uio.h>
85 #include <unistd.h>
86 #include <errno.h>
87-#include <sys/poll.h>
88+#include <poll.h>
89
90 /*
91 * Stack allocated by thread when doing blocking operation
92diff --git a/jdk/src/solaris/native/java/net/linux_close.c b/jdk/src/solaris/native/java/net/linux_close.c
93index 98e1ce09..85fba135 100644
94--- a/jdk/src/solaris/native/java/net/linux_close.c
95+++ b/jdk/src/solaris/native/java/net/linux_close.c
96@@ -34,7 +34,7 @@
97 #include <sys/uio.h>
98 #include <unistd.h>
99 #include <errno.h>
100-#include <sys/poll.h>
101+#include <poll.h>
102
103 /*
104 * Stack allocated by thread when doing blocking operation
105diff --git a/jdk/src/solaris/native/java/net/net_util_md.h b/jdk/src/solaris/native/java/net/net_util_md.h
106index a48446de..8915b68a 100644
107--- a/jdk/src/solaris/native/java/net/net_util_md.h
108+++ b/jdk/src/solaris/native/java/net/net_util_md.h
109@@ -33,7 +33,7 @@
110 #include <unistd.h>
111
112 #ifndef USE_SELECT
113-#include <sys/poll.h>
114+#include <poll.h>
115 #endif
116
117
118diff --git a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
119index 6860a167..20849dab 100644
120--- a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
121+++ b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
122@@ -28,7 +28,7 @@
123 #include "jvm.h"
124 #include "jlong.h"
125 #include "sun_nio_ch_DevPollArrayWrapper.h"
126-#include <sys/poll.h>
127+#include <poll.h>
128 #include <unistd.h>
129 #include <sys/time.h>
130
131diff --git a/jdk/src/solaris/native/sun/nio/ch/Net.c b/jdk/src/solaris/native/sun/nio/ch/Net.c
132index 73560ad6..a3720055 100644
133--- a/jdk/src/solaris/native/sun/nio/ch/Net.c
134+++ b/jdk/src/solaris/native/sun/nio/ch/Net.c
135@@ -23,7 +23,7 @@
136 * questions.
137 */
138
139-#include <sys/poll.h>
140+#include <poll.h>
141 #include <sys/types.h>
142 #include <sys/socket.h>
143 #include <string.h>
144diff --git a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
145index 375aaa48..7606e9ba 100644
146--- a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
147+++ b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
148@@ -32,7 +32,7 @@
149 #include <dlfcn.h>
150 #include <sys/types.h>
151 #include <sys/socket.h>
152-#include <sys/poll.h>
153+#include <poll.h>
154 #include <sys/inotify.h>
155
156 #include "sun_nio_fs_LinuxWatchService.h"
157diff --git a/jdk/src/solaris/transport/socket/socket_md.c b/jdk/src/solaris/transport/socket/socket_md.c
158index 33e062e0..819fcabd 100644
159--- a/jdk/src/solaris/transport/socket/socket_md.c
160+++ b/jdk/src/solaris/transport/socket/socket_md.c
161@@ -37,7 +37,7 @@
162 #include <thread.h>
163 #else
164 #include <pthread.h>
165-#include <sys/poll.h>
166+#include <poll.h>
167 #endif
168
169 #include "socket_md.h"
170--
1712.16.2
172