workaround: libnet: ipv6_support: skip /proc/net/ & socket() check ifdef __ANDROID__ (#27)

see ae218d9bdc%5E%21

this commit is subset of the changes mentioned above and should get
further tests before merge into JDK.
This commit is contained in:
eval Nya 2024-07-28 02:21:21 +08:00 committed by GitHub
parent 29af9b03da
commit 65bd51bf8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59882,6 +59882,22 @@ index bd0bd8c2c9..f6273dff47 100644
#include <arpa/inet.h>
#include <net/route.h>
#include <sys/utsname.h>
@@ -319,6 +319,7 @@ jint IPv6_supported()
SOCKADDR sa;
socklen_t sa_len = sizeof(sa);
+#ifndef __ANDROID__ // ANDROID: skip check, see libcore commit ae218d9b
fd = JVM_Socket(AF_INET6, SOCK_STREAM, 0) ;
if (fd < 0) {
/*
@@ -363,6 +364,7 @@ jint IPv6_supported()
}
}
#endif
+#endif // !defined __ANDROID__
/**
* On Solaris 8 it's possible to create INET6 sockets even
@@ -577,7 +581,9 @@ static void initLoopbackRoutes() {
*/
if ( (dest_plen < 0 || dest_plen > 128) ||