diff options
-rw-r--r-- | include/arpa/inet.h | 21 | ||||
-rw-r--r-- | sys/netinet/in.h | 8 | ||||
-rw-r--r-- | sys/sys/types.h | 13 |
3 files changed, 26 insertions, 16 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h index 0b41eb253c3..97a6eec6a6b 100644 --- a/include/arpa/inet.h +++ b/include/arpa/inet.h @@ -1,4 +1,4 @@ -/* $OpenBSD: inet.h,v 1.19 2015/09/14 08:24:37 guenther Exp $ */ +/* $OpenBSD: inet.h,v 1.20 2017/02/04 02:54:33 guenther Exp $ */ /* * ++Copyright++ 1983, 1993 @@ -61,9 +61,9 @@ /* External definitions for functions in inet(3) */ -#include <sys/types.h> +#include <sys/cdefs.h> +#include <sys/_endian.h> -/* <sys/_endian.h> is pulled in by <sys/types.h> */ #ifndef htons #define htons(x) __htobe16(x) #define htonl(x) __htobe32(x) @@ -76,6 +76,12 @@ typedef __socklen_t socklen_t; /* length type for network syscalls */ #endif +#ifndef _IN_TYPES_DEFINED_ +#define _IN_TYPES_DEFINED_ +typedef __in_addr_t in_addr_t; /* base type for internet address */ +typedef __in_port_t in_port_t; /* IP port type */ +#endif + /* * Buffer lengths for strings containing printable IP addresses */ @@ -97,6 +103,15 @@ struct in_addr { #endif +#if __BSD_VISIBLE +/* need this for the non-standard stuff */ +#ifndef _SIZE_T_DEFINED_ +#define _SIZE_T_DEFINED_ +typedef __size_t size_t; +#endif +#endif + + __BEGIN_DECLS in_addr_t inet_addr(const char *); char *inet_ntoa(struct in_addr); diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 997478c4f21..ab2c9ca63b9 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -1,4 +1,4 @@ -/* $OpenBSD: in.h,v 1.120 2016/12/22 11:04:44 rzalamena Exp $ */ +/* $OpenBSD: in.h,v 1.121 2017/02/04 02:54:33 guenther Exp $ */ /* $NetBSD: in.h,v 1.20 1996/02/13 23:41:47 christos Exp $ */ /* @@ -58,6 +58,12 @@ typedef __sa_family_t sa_family_t; /* sockaddr address family type */ #endif /* _SA_FAMILY_T_DEFINED_ */ +#ifndef _IN_TYPES_DEFINED_ +#define _IN_TYPES_DEFINED_ +typedef __in_addr_t in_addr_t; /* base type for internet address */ +typedef __in_port_t in_port_t; /* IP port type */ +#endif + /* * Protocols */ diff --git a/sys/sys/types.h b/sys/sys/types.h index a9ac053b636..647359c175f 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -1,4 +1,4 @@ -/* $OpenBSD: types.h,v 1.46 2016/09/12 19:41:20 guenther Exp $ */ +/* $OpenBSD: types.h,v 1.47 2017/02/04 02:54:33 guenther Exp $ */ /* $NetBSD: types.h,v 1.29 1996/11/15 22:48:25 jtc Exp $ */ /*- @@ -152,17 +152,6 @@ typedef __fsblkcnt_t fsblkcnt_t; /* file system block count */ typedef __fsfilcnt_t fsfilcnt_t; /* file system file count */ /* - * XPG4.2 states that inclusion of <netinet/in.h> must pull these - * in and that inclusion of <sys/socket.h> must pull in sa_family_t. - * We put these here because there are other headers that require - * these types and <sys/socket.h> and <netinet/in.h> will indirectly - * include <sys/types.h>. - * XXX - now that we have protected versions these should move. - */ -typedef __in_addr_t in_addr_t; /* base type for internet address */ -typedef __in_port_t in_port_t; /* IP port type */ - -/* * The following types may be defined in multiple header files. */ #ifndef _CLOCK_T_DEFINED_ |