-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b11
With the fix for JDK-8211146 several C-preprocessor statements of form #elif __linux__ were changed to more accurate #elif defined(__linux__).
grep found a few more occurrences of the same pattern.
For example (not a complete list):
diff --git a/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c b/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c
--- a/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c
+++ b/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c
@@ -31,7 +31,7 @@
#include <string.h>
#include <poll.h>
.
-#if __linux__
+#if defined(__linux__)
#include <netinet/in.h>
#endif
.
diff --git a/src/jdk.sctp/unix/native/libsctp/SctpNet.c b/src/jdk.sctp/unix/native/libsctp/SctpNet.c
--- a/src/jdk.sctp/unix/native/libsctp/SctpNet.c
+++ b/src/jdk.sctp/unix/native/libsctp/SctpNet.c
@@ -400,7 +400,7 @@
int i, addrCount;
jobjectArray isaa;
.
-#if __solaris__
+#if defined(__solaris__)
if ((addrCount = nio_sctp_getpaddrs(fd, id, (void **)&addr_buf)) == -1) {
#else /* __linux__ */
if ((addrCount = nio_sctp_getpaddrs(fd, id, (struct sockaddr **)&addr_buf)) == -1) {
grep found a few more occurrences of the same pattern.
For example (not a complete list):
diff --git a/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c b/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c
--- a/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c
+++ b/src/java.base/unix/native/libnio/ch/SocketChannelImpl.c
@@ -31,7 +31,7 @@
#include <string.h>
#include <poll.h>
.
-#if __linux__
+#if defined(__linux__)
#include <netinet/in.h>
#endif
.
diff --git a/src/jdk.sctp/unix/native/libsctp/SctpNet.c b/src/jdk.sctp/unix/native/libsctp/SctpNet.c
--- a/src/jdk.sctp/unix/native/libsctp/SctpNet.c
+++ b/src/jdk.sctp/unix/native/libsctp/SctpNet.c
@@ -400,7 +400,7 @@
int i, addrCount;
jobjectArray isaa;
.
-#if __solaris__
+#if defined(__solaris__)
if ((addrCount = nio_sctp_getpaddrs(fd, id, (void **)&addr_buf)) == -1) {
#else /* __linux__ */
if ((addrCount = nio_sctp_getpaddrs(fd, id, (struct sockaddr **)&addr_buf)) == -1) {
- relates to
-
JDK-8211146 fix problematic elif-tests after recent gcc warning changes Werror=undef
-
- Closed
-