Skip to content

Commit 65bd51b

Browse files
authored
workaround: libnet: ipv6_support: skip /proc/net/ & socket() check ifdef __ANDROID__ (#27)
see https://android.googlesource.com/platform/libcore/+/ae218d9bdc8395ac0ed9278c86cff597915c2a7b%5E%21 this commit is subset of the changes mentioned above and should get further tests before merge into JDK.
1 parent 29af9b0 commit 65bd51b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

patches/jdk8u_android.diff

+16
Original file line numberDiff line numberDiff line change
@@ -59882,6 +59882,22 @@ index bd0bd8c2c9..f6273dff47 100644
5988259882
#include <arpa/inet.h>
5988359883
#include <net/route.h>
5988459884
#include <sys/utsname.h>
59885+
@@ -319,6 +319,7 @@ jint IPv6_supported()
59886+
SOCKADDR sa;
59887+
socklen_t sa_len = sizeof(sa);
59888+
59889+
+#ifndef __ANDROID__ // ANDROID: skip check, see libcore commit ae218d9b
59890+
fd = JVM_Socket(AF_INET6, SOCK_STREAM, 0) ;
59891+
if (fd < 0) {
59892+
/*
59893+
@@ -363,6 +364,7 @@ jint IPv6_supported()
59894+
}
59895+
}
59896+
#endif
59897+
+#endif // !defined __ANDROID__
59898+
59899+
/**
59900+
* On Solaris 8 it's possible to create INET6 sockets even
5988559901
@@ -577,7 +581,9 @@ static void initLoopbackRoutes() {
5988659902
*/
5988759903
if ( (dest_plen < 0 || dest_plen > 128) ||

0 commit comments

Comments
 (0)