summaryrefslogtreecommitdiff
path: root/experimental/openjdk7/icedtea-jdk-fix-ipv6-init.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-02-26 23:08:27 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-02-26 23:08:27 +0000
commite3a4ee5e107db0e37a99e7b50d976b0e938f5392 (patch)
treec96d33f0fb63ab0c2df3b2d8c6982950691ed17f /experimental/openjdk7/icedtea-jdk-fix-ipv6-init.patch
parent5ba732fc812b6ccc5a40d43a1a4fd9c769bc73e0 (diff)
downloadpackages-e3a4ee5e107db0e37a99e7b50d976b0e938f5392.tar.gz
packages-e3a4ee5e107db0e37a99e7b50d976b0e938f5392.tar.bz2
packages-e3a4ee5e107db0e37a99e7b50d976b0e938f5392.tar.xz
packages-e3a4ee5e107db0e37a99e7b50d976b0e938f5392.zip
experimental/openjdk7: new package (requires gawk)
Diffstat (limited to 'experimental/openjdk7/icedtea-jdk-fix-ipv6-init.patch')
-rw-r--r--experimental/openjdk7/icedtea-jdk-fix-ipv6-init.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/experimental/openjdk7/icedtea-jdk-fix-ipv6-init.patch b/experimental/openjdk7/icedtea-jdk-fix-ipv6-init.patch
new file mode 100644
index 000000000..11f3bf6dd
--- /dev/null
+++ b/experimental/openjdk7/icedtea-jdk-fix-ipv6-init.patch
@@ -0,0 +1,42 @@
+--- openjdk/jdk/src/solaris/native/java/net/net_util_md.c.orig
++++ openjdk/jdk/src/solaris/native/java/net/net_util_md.c
+@@ -561,7 +561,7 @@
+
+ static struct localinterface *localifs = 0;
+ static int localifsSize = 0; /* size of array */
+-static int nifs = 0; /* number of entries used in array */
++static int nifs = -1; /* number of entries used in array */
+
+ /* not thread safe: make sure called once from one thread */
+
+@@ -573,6 +573,10 @@
+ int index, x1, x2, x3;
+ unsigned int u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,ua,ub,uc,ud,ue,uf;
+
++ if (nifs >= 0)
++ return ;
++ nifs = 0;
++
+ if ((f = fopen("/proc/net/if_inet6", "r")) == NULL) {
+ return ;
+ }
+@@ -601,7 +605,7 @@
+ localifs = (struct localinterface *) realloc (
+ localifs, sizeof (struct localinterface)* (localifsSize+5));
+ if (localifs == 0) {
+- nifs = 0;
++ nifs = -1;
+ fclose (f);
+ return;
+ }
+@@ -624,9 +628,7 @@
+ static int getLocalScopeID (char *addr) {
+ struct localinterface *lif;
+ int i;
+- if (localifs == 0) {
+- initLocalIfs();
+- }
++ initLocalIfs();
+ for (i=0, lif=localifs; i<nifs; i++, lif++) {
+ if (memcmp (addr, lif->localaddr, 16) == 0) {
+ return lif->index;