This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add socklen_t probe; Configure maintenance.
[perl5.git] / doio.c
diff --git a/doio.c b/doio.c
index a7b6a90..5f284db 100644 (file)
--- a/doio.c
+++ b/doio.c
 # endif
 #endif
 
-/* Put this after #includes because <unistd.h> defines _XOPEN_*. */
+/* Put this after #includes because <unistd.h> defines _XOPEN_*.
+ * Sock_size_t is defined identically in pp_sys.c. */
 #ifndef Sock_size_t
-#  if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED) || defined(__GLIBC__)
-#    define Sock_size_t Size_t
+#  ifdef HAS_SOCKLEN_T
+#      define Sock_size_t socklen_t
 #  else
-#    define Sock_size_t int
+#      if _XOPEN_VERSION >= 5 || defined(_XOPEN_SOURCE_EXTENDED) || defined(__GLIBC__)
+#          define Sock_size_t Size_t
+#      else
+#          define Sock_size_t int
+#      endif
 #  endif
 #endif