aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/0007-jdk-use-correct-include-for-poll.patch
blob: af4dde9e500484845beda112e8b66f983e9a61d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
From df9c5738c4a8a00ba65948503ff0c0cfa2f17e95 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
Date: Tue, 27 Feb 2018 09:28:06 +0000
Subject: [PATCH 7/9] jdk: use correct include for poll
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Compiling against musl-libc gives the following warning (which is
treated as error due to -Werror:
| In file included from jdk/src/solaris/native/java/net/net_util_md.h:36:0,
|                  from jdk/src/share/native/java/net/net_util.h:31,
|                  from jdk/src/solaris/native/java/net/InetAddressImplFactory.c:28:
| usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp]
|  #warning redirecting incorrect #include <sys/poll.h> to <poll.h>
|   ^~~~~~~
etc.

To use poll(), poll.h needs to be included, even on glibc - do so using
the following command:
    for i in $(git grep sys/poll\.h jdk | cut -f 1 -d : | sort -u) ; do
        sed -e 's,sys/poll\.h,poll.h,g' -i ${i}
    done

Upstream-Status: Pending
Signed-off-by: André Draszik <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
---
 jdk/src/aix/native/java/net/aix_close.c                 | 2 +-
 jdk/src/aix/native/sun/nio/ch/AixPollPort.c             | 2 +-
 jdk/src/solaris/native/java/net/PlainSocketImpl.c       | 2 +-
 jdk/src/solaris/native/java/net/bsd_close.c             | 2 +-
 jdk/src/solaris/native/java/net/linux_close.c           | 2 +-
 jdk/src/solaris/native/java/net/net_util_md.h           | 2 +-
 jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c | 2 +-
 jdk/src/solaris/native/sun/nio/ch/Net.c                 | 2 +-
 jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c   | 2 +-
 jdk/src/solaris/transport/socket/socket_md.c            | 2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/jdk/src/aix/native/java/net/aix_close.c b/jdk/src/aix/native/java/net/aix_close.c
index 8c070e4b..126f4d7d 100644
--- a/jdk/src/aix/native/java/net/aix_close.c
+++ b/jdk/src/aix/native/java/net/aix_close.c
@@ -51,7 +51,7 @@
 #include <unistd.h>
 #include <errno.h>
 
-#include <sys/poll.h>
+#include <poll.h>
 
 /*
  * Stack allocated by thread when doing blocking operation
diff --git a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
index 70064b89..c10c602b 100644
--- a/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
+++ b/jdk/src/aix/native/sun/nio/ch/AixPollPort.c
@@ -34,7 +34,7 @@
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/pollset.h>
 #include <fcntl.h>
 #include <stddef.h>
diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
index 71cbdf8c..170957e7 100644
--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
@@ -28,7 +28,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #if defined(__linux__) && !defined(USE_SELECT)
-#include <sys/poll.h>
+#include <poll.h>
 #endif
 #include <netinet/tcp.h>        /* Defines TCP_NODELAY, needed for 2.6 */
 #include <netinet/in.h>
diff --git a/jdk/src/solaris/native/java/net/bsd_close.c b/jdk/src/solaris/native/java/net/bsd_close.c
index af57cef3..64d04088 100644
--- a/jdk/src/solaris/native/java/net/bsd_close.c
+++ b/jdk/src/solaris/native/java/net/bsd_close.c
@@ -36,7 +36,7 @@
 #include <sys/uio.h>
 #include <unistd.h>
 #include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
 
 /*
  * Stack allocated by thread when doing blocking operation
diff --git a/jdk/src/solaris/native/java/net/linux_close.c b/jdk/src/solaris/native/java/net/linux_close.c
index 98e1ce09..85fba135 100644
--- a/jdk/src/solaris/native/java/net/linux_close.c
+++ b/jdk/src/solaris/native/java/net/linux_close.c
@@ -34,7 +34,7 @@
 #include <sys/uio.h>
 #include <unistd.h>
 #include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
 
 /*
  * Stack allocated by thread when doing blocking operation
diff --git a/jdk/src/solaris/native/java/net/net_util_md.h b/jdk/src/solaris/native/java/net/net_util_md.h
index a48446de..8915b68a 100644
--- a/jdk/src/solaris/native/java/net/net_util_md.h
+++ b/jdk/src/solaris/native/java/net/net_util_md.h
@@ -33,7 +33,7 @@
 #include <unistd.h>
 
 #ifndef USE_SELECT
-#include <sys/poll.h>
+#include <poll.h>
 #endif
 
 
diff --git a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
index 6860a167..20849dab 100644
--- a/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
+++ b/jdk/src/solaris/native/sun/nio/ch/DevPollArrayWrapper.c
@@ -28,7 +28,7 @@
 #include "jvm.h"
 #include "jlong.h"
 #include "sun_nio_ch_DevPollArrayWrapper.h"
-#include <sys/poll.h>
+#include <poll.h>
 #include <unistd.h>
 #include <sys/time.h>
 
diff --git a/jdk/src/solaris/native/sun/nio/ch/Net.c b/jdk/src/solaris/native/sun/nio/ch/Net.c
index 73560ad6..a3720055 100644
--- a/jdk/src/solaris/native/sun/nio/ch/Net.c
+++ b/jdk/src/solaris/native/sun/nio/ch/Net.c
@@ -23,7 +23,7 @@
  * questions.
  */
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <string.h>
diff --git a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
index 375aaa48..7606e9ba 100644
--- a/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
+++ b/jdk/src/solaris/native/sun/nio/fs/LinuxWatchService.c
@@ -32,7 +32,7 @@
 #include <dlfcn.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include <sys/poll.h>
+#include <poll.h>
 #include <sys/inotify.h>
 
 #include "sun_nio_fs_LinuxWatchService.h"
diff --git a/jdk/src/solaris/transport/socket/socket_md.c b/jdk/src/solaris/transport/socket/socket_md.c
index 33e062e0..819fcabd 100644
--- a/jdk/src/solaris/transport/socket/socket_md.c
+++ b/jdk/src/solaris/transport/socket/socket_md.c
@@ -37,7 +37,7 @@
 #include <thread.h>
 #else
 #include <pthread.h>
-#include <sys/poll.h>
+#include <poll.h>
 #endif
 
 #include "socket_md.h"
-- 
2.16.2