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_