diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2011-03-17 20:40:49 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2011-03-17 20:40:49 +0000 |
commit | 0ba14edc9b5ea8af2666a2a191b67e8f80ec11d1 (patch) | |
tree | 9e7617e15c661629188cdff395e9fd735aff8a4a /java/openjdk6/files/patch-set | |
parent | Fix transmission-qt to avoid link with both libevent 1.x and 2.x libraries (diff) |
Rework the previous fix to sync. with upstream:
http://hg.openjdk.java.net/jdk7/jdk7/jdk/diff/441f88d39988/src/solaris/native/java/net/net_util_md.c
Note it has no functional change for FreeBSD because sizeof(socklen_t) is
luckily sizeof(int). Actually, this commit is just to note that the regression
was acidentally pulled in from upstream because of my ignorance. Specifically,
the following commit was the culprit:
http://hg.openjdk.java.net/jdk7/jdk7/jdk/diff/b7fce4bac617/src/solaris/native/java/net/net_util_md.c
FYI, it also triggered the following upstream PR:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6730740
Obtained from: OpenJDK project
Pointyhat: jkim
Diffstat (limited to 'java/openjdk6/files/patch-set')
-rw-r--r-- | java/openjdk6/files/patch-set | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set index 8df9391c137b..c903e161afb7 100644 --- a/java/openjdk6/files/patch-set +++ b/java/openjdk6/files/patch-set @@ -16578,7 +16578,7 @@ /* * The fd table and the number of file descriptors --- jdk/src/solaris/native/java/net/net_util_md.c 2011-02-28 11:06:49.000000000 -0500 -+++ jdk/src/solaris/native/java/net/net_util_md.c 2011-03-03 16:56:30.000000000 -0500 ++++ jdk/src/solaris/native/java/net/net_util_md.c 2011-03-17 15:21:37.000000000 -0400 @@ -34,6 +34,15 @@ #include <stdlib.h> #include <dlfcn.h> @@ -16638,16 +16638,24 @@ /* * On Linux if we are connecting to a link-local address * we need to specify the interface in the scope_id (2.4 kernel only) -@@ -1086,7 +1108,7 @@ +@@ -1086,7 +1108,16 @@ } #endif -- rv = getsockopt(fd, level, opt, result, len); -+ rv = getsockopt(fd, level, opt, result, (socklen_t *) len); ++#ifdef __solaris__ + rv = getsockopt(fd, level, opt, result, len); ++#else ++ { ++ socklen_t socklen = *len; ++ rv = getsockopt(fd, level, opt, result, &socklen); ++ *len = socklen; ++ } ++#endif ++ if (rv < 0) { return rv; } -@@ -1133,6 +1155,24 @@ +@@ -1133,6 +1164,24 @@ #define IPTOS_PREC_MASK 0xe0 #endif @@ -16672,7 +16680,7 @@ /* * IPPROTO/IP_TOS :- * 1. IPv6 on Solaris: no-op and will be set in flowinfo -@@ -1165,6 +1205,10 @@ +@@ -1165,6 +1214,10 @@ *iptos &= (IPTOS_TOS_MASK | IPTOS_PREC_MASK); } @@ -16683,7 +16691,7 @@ /* * SOL_SOCKET/{SO_SNDBUF,SO_RCVBUF} - On Solaris need to * ensure that value is <= max_buf as otherwise we get -@@ -1212,6 +1256,84 @@ +@@ -1212,6 +1265,84 @@ } #endif |