diff options
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.patch | 173 |
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 @@ | |||
1 | From 48d7384387394820f2f5e8bdc2982c242568b548 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> | ||
3 | Date: Tue, 27 Feb 2018 09:28:06 +0000 | ||
4 | Subject: [PATCH 2004/2008] jdk: use correct include for poll | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Compiling against musl-libc gives the following warning (which is | ||
10 | treated 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 | | ^~~~~~~ | ||
17 | etc. | ||
18 | |||
19 | To use poll(), poll.h needs to be included, even on glibc - do so using | ||
20 | the 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 | |||
25 | Upstream-Status: Pending | ||
26 | Signed-off-by: André Draszik <andre.draszik@jci.com> | ||
27 | Signed-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 | |||
41 | diff --git a/jdk/src/aix/native/java/net/aix_close.c b/jdk/src/aix/native/java/net/aix_close.c | ||
42 | index 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 | ||
54 | diff --git a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c | ||
55 | index 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> | ||
67 | diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c | ||
68 | index 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> | ||
80 | diff --git a/jdk/src/solaris/native/java/net/bsd_close.c b/jdk/src/solaris/native/java/net/bsd_close.c | ||
81 | index 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 | ||
93 | diff --git a/jdk/src/solaris/native/java/net/linux_close.c b/jdk/src/solaris/native/java/net/linux_close.c | ||
94 | index 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 | ||
106 | diff --git a/jdk/src/solaris/native/java/net/net_util_md.h b/jdk/src/solaris/native/java/net/net_util_md.h | ||
107 | index 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 | |||
119 | diff --git a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c | ||
120 | index 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 | |||
132 | diff --git a/jdk/src/solaris/native/sun/nio/ch/Net.c b/jdk/src/solaris/native/sun/nio/ch/Net.c | ||
133 | index 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> | ||
145 | diff --git a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c | ||
146 | index 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" | ||
158 | diff --git a/jdk/src/solaris/transport/socket/socket_md.c b/jdk/src/solaris/transport/socket/socket_md.c | ||
159 | index 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 | -- | ||
172 | 2.24.1 | ||
173 | |||