< prev index next >

src/java.base/unix/native/libnio/ch/DatagramChannelImpl.c

Print this page
rev 59383 : [mq]: final

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -48,13 +48,10 @@
                                                 jobject fdo, jboolean isIPv6)
 {
     jint fd = fdval(env, fdo);
     int rv;
 
-#if defined(__solaris__)
-    rv = connect(fd, 0, 0);
-#else
     SOCKETADDRESS sa;
     socklen_t len = isIPv6 ? sizeof(struct sockaddr_in6) :
                              sizeof(struct sockaddr_in);
 
     memset(&sa, 0, sizeof(sa));

@@ -76,12 +73,10 @@
      */
     if (rv < 0 && errno == EAFNOSUPPORT)
         rv = errno = 0;
 #endif // defined(_ALLBSD_SOURCE) || defined(_AIX)
 
-#endif // defined(__solaris__)
-
     if (rv < 0)
         handleSocketError(env, errno);
 }
 
 JNIEXPORT jint JNICALL
< prev index next >