summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-02-04 02:54:33 +0000
committerguenther <guenther@openbsd.org>2017-02-04 02:54:33 +0000
commit828e760f53b8314f390c6402bf66cd3b22dfbb58 (patch)
tree88cc691a07e12535169310b5c9d5811b36ab425d /include
parentuse ssh_packet_set_log_preamble() to include connection username (diff)
downloadwireguard-openbsd-828e760f53b8314f390c6402bf66cd3b22dfbb58.tar.xz
wireguard-openbsd-828e760f53b8314f390c6402bf66cd3b22dfbb58.zip
Move the typedefs for in_{addr,port}_t from <sys/types.h> to
<netinet/in.h> and <arpa/inet.h> ok and ports test naddy@ (thanks!) ok krw@ beck@ millert@
Diffstat (limited to 'include')
-rw-r--r--include/arpa/inet.h21
1 files changed, 18 insertions, 3 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);