Skip to content

Commit

Permalink
workaround: libnet: ipv6_support: skip /proc/net/ & socket() check if…
Browse files Browse the repository at this point in the history
…def __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.
  • Loading branch information
nexplorer-3e authored Jul 27, 2024
1 parent 29af9b0 commit 65bd51b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions patches/jdk8u_android.diff
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down

0 comments on commit 65bd51b

Please sign in to comment.