src/share/native/java/net/net_util.c

Print this page
rev 8725 : 8024854: Basic changes and files to build the class library on AIX
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, 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

@@ -26,10 +26,15 @@
 #include "jni.h"
 #include "jvm.h"
 #include "jni_util.h"
 #include "net_util.h"
 
+#ifdef _AIX
+/* Initialize stubs for blocking I/O workarounds (see src/solaris/native/java/net/linux_close.c) */
+extern void aix_close_init();
+#endif
+
 int IPv6_supported() ;
 
 static int IPv6_available;
 
 JNIEXPORT jint JNICALL ipv6_available()

@@ -66,10 +71,14 @@
        check now to whether we have IPv6 on this platform and if the
        supporting socket APIs are available
     */
     IPv6_available = IPv6_supported() & (!preferIPv4Stack);
     initLocalAddrTable ();
+#ifdef _AIX
+    /* Initialize stubs for blocking I/O workarounds (see src/solaris/native/java/net/linux_close.c) */
+    aix_close_init();
+#endif
     parseExclusiveBindProperty(env);
 
     return JNI_VERSION_1_2;
 }