Workaround: skip check for ipv6 support (by @nexplorer-3e)

The commit is made instead of PR merge because the PR has a weird file in it
This commit is contained in:
Mathias-Boulay 2024-07-27 19:53:24 +02:00
parent 471ca51954
commit 691cab34d7
3 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,21 @@
// skip some checks as AOSP does
diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c
index 4ec11a136..01b85db4d 100644
--- a/src/java.base/unix/native/libnet/net_util_md.c
+++ b/src/java.base/unix/native/libnet/net_util_md.c
@@ -129,6 +129,7 @@ jint IPv6_supported()
SOCKETADDRESS sa;
socklen_t sa_len = sizeof(SOCKETADDRESS);
+#ifndef __ANDROID__ // ANDROID: skip check, see libcore commit ae218d9b
fd = socket(AF_INET6, SOCK_STREAM, 0) ;
if (fd < 0) {
/*
@@ -172,6 +173,7 @@ jint IPv6_supported()
}
}
#endif
+#endif // !defined __ANDROID__
/*
* OK we may have the stack available in the kernel,

View File

@ -0,0 +1,21 @@
// skip some checks as AOSP does
diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c
index 4ec11a136..01b85db4d 100644
--- a/src/java.base/unix/native/libnet/net_util_md.c
+++ b/src/java.base/unix/native/libnet/net_util_md.c
@@ -129,6 +129,7 @@ jint IPv6_supported()
SOCKETADDRESS sa;
socklen_t sa_len = sizeof(SOCKETADDRESS);
+#ifndef __ANDROID__ // ANDROID: skip check, see libcore commit ae218d9b
fd = socket(AF_INET6, SOCK_STREAM, 0) ;
if (fd < 0) {
/*
@@ -172,6 +173,7 @@ jint IPv6_supported()
}
}
#endif
+#endif // !defined __ANDROID__
/*
* OK we may have the stack available in the kernel,

View File

@ -2258,6 +2258,26 @@ index 21ef40688..b8c2520d2 100644
#endif
if (exec_path == NULL) {
diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c
index 4ec11a136..01b85db4d 100644
--- a/src/java.base/unix/native/libnet/net_util_md.c
+++ b/src/java.base/unix/native/libnet/net_util_md.c
@@ -129,6 +129,7 @@ jint IPv6_supported()
SOCKETADDRESS sa;
socklen_t sa_len = sizeof(SOCKETADDRESS);
+#ifndef __ANDROID__ // ANDROID: skip check, see libcore commit ae218d9b
fd = socket(AF_INET6, SOCK_STREAM, 0) ;
if (fd < 0) {
/*
@@ -172,6 +173,7 @@ jint IPv6_supported()
}
}
#endif
+#endif // !defined __ANDROID__
/*
* OK we may have the stack available in the kernel,
diff --git a/src/java.base/unix/native/libnet/net_util_md.h b/src/java.base/unix/native/libnet/net_util_md.h
index 902cf9673..3b8acd66b 100644
--- a/src/java.base/unix/native/libnet/net_util_md.h