--- nsock/src/nsock_connect.c.orig	2019-05-23 03:08:22 +0000
+++ nsock/src/nsock_connect.c	2019-05-23 03:09:22 +0000
@@ -81,7 +81,11 @@
   }
 
   nsock_log_info("Binding to %s (IOD #%li)", get_localaddr_string(iod), iod->id);
+  #ifdef _AIX
+  rc = bind(iod->sd, (struct sockaddr *)&iod->local, (int) sizeof (struct sockaddr));
+  #else
   rc = bind(iod->sd, (struct sockaddr *)&iod->local, (int) iod->locallen);
+  #endif
   if (rc == -1) {
     int err = socket_errno();
 
