bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/4] sys_socket: typedef sa_family_t correctly on OS/2 kLIBC


From: KO Myung-Hun
Subject: [PATCH 1/4] sys_socket: typedef sa_family_t correctly on OS/2 kLIBC
Date: Thu, 1 Dec 2016 19:52:43 +0900

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 address@hidden@
 # 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

[Prev in Thread] Current Thread [Next in Thread]