jdk/src/solaris/native/java/net/Inet6AddressImpl.c
changeset 2056 115e09b7a004
parent 910 1f53246fb014
child 3226 b142b3d06bf5
--- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c	Tue Feb 10 03:26:31 2009 -0800
+++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c	Wed Feb 11 13:16:53 2009 +0000
@@ -196,16 +196,18 @@
         hints.ai_flags = AI_CANONNAME;
         hints.ai_family = AF_UNSPEC;
 
+#ifdef __solaris__
         /*
          * Workaround for Solaris bug 4160367 - if a hostname contains a
          * white space then 0.0.0.0 is returned
          */
-        if (isspace(hostname[0])) {
+        if (isspace((unsigned char)hostname[0])) {
             JNU_ThrowByName(env, JNU_JAVANETPKG "UnknownHostException",
                             (char *)hostname);
             JNU_ReleaseStringPlatformChars(env, host, hostname);
             return NULL;
         }
+#endif
 
         error = (*getaddrinfo_ptr)(hostname, NULL, &hints, &res);
 
@@ -455,7 +457,8 @@
 ping6(JNIEnv *env, jint fd, struct sockaddr_in6* him, jint timeout,
       struct sockaddr_in6* netif, jint ttl) {
     jint size;
-    jint n, len;
+    jint n;
+    socklen_t len;
     char sendbuf[1500];
     unsigned char recvbuf[1500];
     struct icmp6_hdr *icmp6;