On OS/2 kLIBC, sa_family_t is unsigned char unless TCPV40HDRS is
defined.

* lib/sys_socket.in.h (sa_family_t): Typedef to unsigned char on
OS/2 kLIBC unless TCPV40HDRS is defined.
---
 lib/sys_socket.in.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h
index 79aa14e..980a112 100644
--- a/lib/sys_socket.in.h
+++ b/lib/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
-- 
2.9.2


Reply via email to