diff src/solaris/native/java/net/net_util_md.c @ 454:441f88d39988

6730740: Fix for 6729881 has apparently broken several 64 bit tests: "Bad address" Reviewed-by: alanb, jccollet
author chegar
date Tue, 29 Jul 2008 09:53:35 -0700
parents b7fce4bac617
children 343253d05123
line wrap: on
line diff
--- a/src/solaris/native/java/net/net_util_md.c	Mon Jul 28 13:02:11 2008 +0100
+++ b/src/solaris/native/java/net/net_util_md.c	Tue Jul 29 09:53:35 2008 -0700
@@ -1085,7 +1085,16 @@
     }
 #endif
 
-    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;
     }