From c6e43821cd19506ca3f153231f5fa4b840e9d80e Mon Sep 17 00:00:00 2001 From: Mike Barcroft Date: Sat, 20 Apr 2002 02:24:35 +0000 Subject: [PATCH] Add sa_family_t type to and typedefs to and . Previously, sa_family_t was only typedef'd in . --- sys/netinet/in.h | 5 +++++ sys/sys/_types.h | 1 + sys/sys/socket.h | 8 ++++++-- 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 #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 +#include #define _NO_NAMESPACE_POLLUTION #include #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_