--- a/jdk/src/windows/native/java/net/net_util_md.c Wed Mar 30 21:10:02 2011 -0700
+++ b/jdk/src/windows/native/java/net/net_util_md.c Thu Mar 31 17:37:11 2011 +0100
@@ -230,7 +230,7 @@
jint IPv6_supported()
{
SOCKET s = socket(AF_INET6, SOCK_STREAM, 0) ;
- if (s < 0) {
+ if (s == INVALID_SOCKET) {
return JNI_FALSE;
}
closesocket(s);
@@ -775,7 +775,7 @@
DWORD b;
struct sockaddr_in6 route;
SOCKET fd = socket(AF_INET6, SOCK_STREAM, 0);
- if (fd < 0) {
+ if (fd == INVALID_SOCKET) {
return 0;
}
@@ -783,7 +783,7 @@
(void *)target_addr, sizeof(struct sockaddr_in6),
(void *)&route, sizeof(struct sockaddr_in6),
&b, 0, 0);
- if (ret < 0) {
+ if (ret == SOCKET_ERROR) {
// error
closesocket(fd);
return 0;