File tree 3 files changed +62
-0
lines changed
3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ // skip some checks as AOSP does
2
+ diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c
3
+ index 4ec11a136..01b85db4d 100644
4
+ --- a/src/java.base/unix/native/libnet/net_util_md.c
5
+ +++ b/src/java.base/unix/native/libnet/net_util_md.c
6
+ @@ -129,6 +129,7 @@ jint IPv6_supported()
7
+ SOCKETADDRESS sa;
8
+ socklen_t sa_len = sizeof(SOCKETADDRESS);
9
+
10
+ + #ifndef __ANDROID__ // ANDROID: skip check, see libcore commit ae218d9b
11
+ fd = socket(AF_INET6, SOCK_STREAM, 0) ;
12
+ if (fd < 0) {
13
+ /*
14
+ @@ -172,6 +173,7 @@ jint IPv6_supported()
15
+ }
16
+ }
17
+ #endif
18
+ + #endif // !defined __ANDROID__
19
+
20
+ /*
21
+ * OK we may have the stack available in the kernel,
Original file line number Diff line number Diff line change
1
+ // skip some checks as AOSP does
2
+ diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c
3
+ index 4ec11a136..01b85db4d 100644
4
+ --- a/src/java.base/unix/native/libnet/net_util_md.c
5
+ +++ b/src/java.base/unix/native/libnet/net_util_md.c
6
+ @@ -129,6 +129,7 @@ jint IPv6_supported()
7
+ SOCKETADDRESS sa;
8
+ socklen_t sa_len = sizeof(SOCKETADDRESS);
9
+
10
+ + #ifndef __ANDROID__ // ANDROID: skip check, see libcore commit ae218d9b
11
+ fd = socket(AF_INET6, SOCK_STREAM, 0) ;
12
+ if (fd < 0) {
13
+ /*
14
+ @@ -172,6 +173,7 @@ jint IPv6_supported()
15
+ }
16
+ }
17
+ #endif
18
+ + #endif // !defined __ANDROID__
19
+
20
+ /*
21
+ * OK we may have the stack available in the kernel,
Original file line number Diff line number Diff line change @@ -2258,6 +2258,26 @@ index 21ef40688..b8c2520d2 100644
2258
2258
#endif
2259
2259
2260
2260
if (exec_path == NULL) {
2261
+ diff --git a/src/java.base/unix/native/libnet/net_util_md.c b/src/java.base/unix/native/libnet/net_util_md.c
2262
+ index 4ec11a136..01b85db4d 100644
2263
+ --- a/src/java.base/unix/native/libnet/net_util_md.c
2264
+ +++ b/src/java.base/unix/native/libnet/net_util_md.c
2265
+ @@ -129,6 +129,7 @@ jint IPv6_supported()
2266
+ SOCKETADDRESS sa;
2267
+ socklen_t sa_len = sizeof(SOCKETADDRESS);
2268
+
2269
+ + #ifndef __ANDROID__ // ANDROID: skip check, see libcore commit ae218d9b
2270
+ fd = socket(AF_INET6, SOCK_STREAM, 0) ;
2271
+ if (fd < 0) {
2272
+ /*
2273
+ @@ -172,6 +173,7 @@ jint IPv6_supported()
2274
+ }
2275
+ }
2276
+ #endif
2277
+ + #endif // !defined __ANDROID__
2278
+
2279
+ /*
2280
+ * OK we may have the stack available in the kernel,
2261
2281
diff --git a/src/java.base/unix/native/libnet/net_util_md.h b/src/java.base/unix/native/libnet/net_util_md.h
2262
2282
index 902cf9673..3b8acd66b 100644
2263
2283
--- a/src/java.base/unix/native/libnet/net_util_md.h
You can’t perform that action at this time.
0 commit comments