summaryrefslogtreecommitdiff
path: root/gl/sys_socket.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'gl/sys_socket.in.h')
-rw-r--r--gl/sys_socket.in.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gl/sys_socket.in.h b/gl/sys_socket.in.h
index d99d831d48..aae931ac57 100644
--- a/gl/sys_socket.in.h
+++ b/gl/sys_socket.in.h
@@ -79,7 +79,12 @@ _GL_INLINE_HEADER_BEGIN
#if !@HAVE_SA_FAMILY_T@
# if !GNULIB_defined_sa_family_t
+/* On OS/2 kLIBC, sa_family_t is unsigned char unless TCPV40HDRS is defined. */
+# if !defined __KLIBC__ || defined TCPV40HDRS
typedef unsigned short sa_family_t;
+# else
+typedef unsigned char sa_family_t;
+# endif
# define GNULIB_defined_sa_family_t 1
# endif
#endif