openjdk11: missing patch

This commit is contained in:
Jerome Duval
2020-10-30 20:37:50 +01:00
parent 031101b998
commit b7fc99174e

View File

@@ -1,4 +1,4 @@
From 8a856dc15c1825289fadf3d1086d6cc5cd7159af Mon Sep 17 00:00:00 2001
From 7355353cafc81403c3d14ccb088e82370ce73c55 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 29 Oct 2020 14:07:26 +0100
Subject: Haiku: workaround for NetworkInterface ioctl calls
@@ -6,10 +6,10 @@ Subject: Haiku: workaround for NetworkInterface ioctl calls
ATM the Haiku network stack checks for ioctl syscall length parameter.
diff --git a/src/java.base/unix/native/libnet/NetworkInterface.c b/src/java.base/unix/native/libnet/NetworkInterface.c
index 653576d..6f03884 100644
index e558463..fbb0e40 100644
--- a/src/java.base/unix/native/libnet/NetworkInterface.c
+++ b/src/java.base/unix/native/libnet/NetworkInterface.c
@@ -2303,7 +2303,7 @@ static int getIndex(int sock, const char *name) {
@@ -2299,7 +2299,7 @@ static int getIndex(int sock, const char *name) {
memset((char *)&if2, 0, sizeof(if2));
strncpy(if2.ifr_name, name, sizeof(if2.ifr_name) - 1);
@@ -18,7 +18,7 @@ index 653576d..6f03884 100644
return -1;
}
@@ -2351,7 +2351,7 @@ static int getMTU(JNIEnv *env, int sock, const char *ifname) {
@@ -2347,7 +2347,7 @@ static int getMTU(JNIEnv *env, int sock, const char *ifname) {
memset((char *)&if2, 0, sizeof(if2));
strncpy(if2.ifr_name, ifname, sizeof(if2.ifr_name) - 1);
@@ -27,7 +27,7 @@ index 653576d..6f03884 100644
NET_ThrowByNameWithLastError
(env, JNU_JAVANETPKG "SocketException", "ioctl(SIOCGIFMTU) failed");
return -1;
@@ -2365,7 +2365,7 @@ static int getFlags(int sock, const char *ifname, int *flags) {
@@ -2361,7 +2361,7 @@ static int getFlags(int sock, const char *ifname, int *flags) {
memset((char *)&if2, 0, sizeof(if2));
strncpy(if2.ifr_name, ifname, sizeof(if2.ifr_name) - 1);
@@ -39,3 +39,26 @@ index 653576d..6f03884 100644
--
2.28.0
From 1c8df12a67297d5819762870c8580058a5e2d2a9 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 30 Oct 2020 19:57:47 +0100
Subject: workaround undef true and false macros
diff --git a/src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template b/src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template
index 26273d9..adc6f65 100644
--- a/src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template
+++ b/src/java.base/share/classes/sun/nio/ch/SocketOptionRegistry.java.template
@@ -55,6 +55,8 @@
/* On Solaris, "sun" is defined as a macro. Undefine to make package
declaration valid */
#undef sun
+#undef true
+#undef false
/* To be able to name the Java constants the same as the C constants without
having the preprocessor rewrite those identifiers, add PREFIX_ to all
--
2.28.0