summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/pp_sys.c b/pp_sys.c
index f9db38e7ac..d5c5426945 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -118,12 +118,17 @@ extern int h_errno;
# define vfork fork
#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 doio.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