aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/in.h5
-rw-r--r--sys/sys/_types.h1
-rw-r--r--sys/sys/socket.h8
3 files changed, 12 insertions, 2 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index d424128fa59a..e946c4e3f487 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -256,6 +256,11 @@ typedef uint16_t in_port_t;
#define _IN_PORT_T_DECLARED
#endif
+#ifdef _BSD_SA_FAMILY_T_
+typedef _BSD_SA_FAMILY_T_ sa_family_t;
+#undef _BSD_SA_FAMILY_T_
+#endif
+
/*
* Internet address (a structure for historical reasons)
*/
diff --git a/sys/sys/_types.h b/sys/sys/_types.h
index 676430a1ef11..f4cdb37d37d1 100644
--- a/sys/sys/_types.h
+++ b/sys/sys/_types.h
@@ -33,6 +33,7 @@
#include <machine/ansi.h>
#define _BSD_GID_T_ __uint32_t
+#define _BSD_SA_FAMILY_T_ __uint8_t
#define _BSD_UID_T_ __uint32_t
#endif /* !_SYS__TYPES_H_ */
diff --git a/sys/sys/socket.h b/sys/sys/socket.h
index 86f78dde3e38..9e054b47ae86 100644
--- a/sys/sys/socket.h
+++ b/sys/sys/socket.h
@@ -37,7 +37,7 @@
#ifndef _SYS_SOCKET_H_
#define _SYS_SOCKET_H_
-#include <machine/ansi.h>
+#include <sys/_types.h>
#define _NO_NAMESPACE_POLLUTION
#include <machine/param.h>
#undef _NO_NAMESPACE_POLLUTION
@@ -49,7 +49,11 @@
/*
* Data types.
*/
-typedef u_char sa_family_t;
+#ifdef _BSD_SA_FAMILY_T_
+typedef _BSD_SA_FAMILY_T_ sa_family_t;
+#undef _BSD_SA_FAMILY_T_
+#endif
+
#ifdef _BSD_SOCKLEN_T_
typedef _BSD_SOCKLEN_T_ socklen_t;
#undef _BSD_SOCKLEN_T_