summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/2004-jdk-use-correct-include-for-poll.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/2004-jdk-use-correct-include-for-poll.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/2004-jdk-use-correct-include-for-poll.patch173
1 files changed, 173 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/2004-jdk-use-correct-include-for-poll.patch b/recipes-core/openjdk/patches-openjdk-8/2004-jdk-use-correct-include-for-poll.patch
new file mode 100644
index 0000000..365b4d6
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/2004-jdk-use-correct-include-for-poll.patch
@@ -0,0 +1,173 @@
1From 48d7384387394820f2f5e8bdc2982c242568b548 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Tue, 27 Feb 2018 09:28:06 +0000
4Subject: [PATCH 2004/2008] 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@jci.com>
27Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
28---
29 src/aix/native/java/net/aix_close.c | 2 +-
30 src/aix/native/sun/nio/ch/AixPollPort.c | 2 +-
31 src/solaris/native/java/net/PlainSocketImpl.c | 2 +-
32 src/solaris/native/java/net/bsd_close.c | 2 +-
33 src/solaris/native/java/net/linux_close.c | 2 +-
34 src/solaris/native/java/net/net_util_md.h | 2 +-
35 src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c | 2 +-
36 src/solaris/native/sun/nio/ch/Net.c | 2 +-
37 src/solaris/native/sun/nio/fs/LinuxWatchService.c | 2 +-
38 src/solaris/transport/socket/socket_md.c | 2 +-
39 10 files changed, 10 insertions(+), 10 deletions(-)
40
41diff --git a/jdk/src/aix/native/java/net/aix_close.c b/jdk/src/aix/native/java/net/aix_close.c
42index 8c070e4b7..126f4d7d4 100644
43--- a/jdk/src/aix/native/java/net/aix_close.c
44+++ b/jdk/src/aix/native/java/net/aix_close.c
45@@ -51,7 +51,7 @@
46 #include <unistd.h>
47 #include <errno.h>
48
49-#include <sys/poll.h>
50+#include <poll.h>
51
52 /*
53 * Stack allocated by thread when doing blocking operation
54diff --git a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
55index 70064b890..c10c602b6 100644
56--- a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
57+++ b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
58@@ -34,7 +34,7 @@
59 #include <unistd.h>
60 #include <sys/types.h>
61 #include <sys/socket.h>
62-#include <sys/poll.h>
63+#include <poll.h>
64 #include <sys/pollset.h>
65 #include <fcntl.h>
66 #include <stddef.h>
67diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
68index 71cbdf8ce..170957e73 100644
69--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
70+++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
71@@ -28,7 +28,7 @@
72 #include <sys/types.h>
73 #include <sys/socket.h>
74 #if defined(__linux__) && !defined(USE_SELECT)
75-#include <sys/poll.h>
76+#include <poll.h>
77 #endif
78 #include <netinet/tcp.h> /* Defines TCP_NODELAY, needed for 2.6 */
79 #include <netinet/in.h>
80diff --git a/jdk/src/solaris/native/java/net/bsd_close.c b/jdk/src/solaris/native/java/net/bsd_close.c
81index af57cef30..64d040887 100644
82--- a/jdk/src/solaris/native/java/net/bsd_close.c
83+++ b/jdk/src/solaris/native/java/net/bsd_close.c
84@@ -36,7 +36,7 @@
85 #include <sys/uio.h>
86 #include <unistd.h>
87 #include <errno.h>
88-#include <sys/poll.h>
89+#include <poll.h>
90
91 /*
92 * Stack allocated by thread when doing blocking operation
93diff --git a/jdk/src/solaris/native/java/net/linux_close.c b/jdk/src/solaris/native/java/net/linux_close.c
94index 98e1ce098..85fba135f 100644
95--- a/jdk/src/solaris/native/java/net/linux_close.c
96+++ b/jdk/src/solaris/native/java/net/linux_close.c
97@@ -34,7 +34,7 @@
98 #include <sys/uio.h>
99 #include <unistd.h>
100 #include <errno.h>
101-#include <sys/poll.h>
102+#include <poll.h>
103
104 /*
105 * Stack allocated by thread when doing blocking operation
106diff --git a/jdk/src/solaris/native/java/net/net_util_md.h b/jdk/src/solaris/native/java/net/net_util_md.h
107index a48446de9..8915b68aa 100644
108--- a/jdk/src/solaris/native/java/net/net_util_md.h
109+++ b/jdk/src/solaris/native/java/net/net_util_md.h
110@@ -33,7 +33,7 @@
111 #include <unistd.h>
112
113 #ifndef USE_SELECT
114-#include <sys/poll.h>
115+#include <poll.h>
116 #endif
117
118
119diff --git a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
120index 6860a167b..20849dabc 100644
121--- a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
122+++ b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
123@@ -28,7 +28,7 @@
124 #include "jvm.h"
125 #include "jlong.h"
126 #include "sun_nio_ch_DevPollArrayWrapper.h"
127-#include <sys/poll.h>
128+#include <poll.h>
129 #include <unistd.h>
130 #include <sys/time.h>
131
132diff --git a/jdk/src/solaris/native/sun/nio/ch/Net.c b/jdk/src/solaris/native/sun/nio/ch/Net.c
133index 73560ad6c..a3720055c 100644
134--- a/jdk/src/solaris/native/sun/nio/ch/Net.c
135+++ b/jdk/src/solaris/native/sun/nio/ch/Net.c
136@@ -23,7 +23,7 @@
137 * questions.
138 */
139
140-#include <sys/poll.h>
141+#include <poll.h>
142 #include <sys/types.h>
143 #include <sys/socket.h>
144 #include <string.h>
145diff --git a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
146index 375aaa485..7606e9ba8 100644
147--- a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
148+++ b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
149@@ -32,7 +32,7 @@
150 #include <dlfcn.h>
151 #include <sys/types.h>
152 #include <sys/socket.h>
153-#include <sys/poll.h>
154+#include <poll.h>
155 #include <sys/inotify.h>
156
157 #include "sun_nio_fs_LinuxWatchService.h"
158diff --git a/jdk/src/solaris/transport/socket/socket_md.c b/jdk/src/solaris/transport/socket/socket_md.c
159index 33e062e08..819fcabdb 100644
160--- a/jdk/src/solaris/transport/socket/socket_md.c
161+++ b/jdk/src/solaris/transport/socket/socket_md.c
162@@ -37,7 +37,7 @@
163 #include <thread.h>
164 #else
165 #include <pthread.h>
166-#include <sys/poll.h>
167+#include <poll.h>
168 #endif
169
170 #include "socket_md.h"
171--
1722.24.1
173