summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2017-02-04 19:16:25 +0000
committerguenther <guenther@openbsd.org>2017-02-04 19:16:25 +0000
commit02a6e1c4ea06ce742b98675a7f1bb66d52865030 (patch)
treed6d40d737582caea72319362287d2e2d98f6da6d
parentRemove gdb waitcount debug code and dummy print. (diff)
downloadwireguard-openbsd-02a6e1c4ea06ce742b98675a7f1bb66d52865030.tar.xz
wireguard-openbsd-02a6e1c4ea06ce742b98675a7f1bb66d52865030.zip
The macro versions of htonl et al don't require them, but POSIX says
<arpa/inet.h> needs to provide uint16_t and uint32_t. ok millert@ krw@ naddy@
-rw-r--r--include/arpa/inet.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index 97a6eec6a6b..8d6ac635ec3 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: inet.h,v 1.20 2017/02/04 02:54:33 guenther Exp $ */
+/* $OpenBSD: inet.h,v 1.21 2017/02/04 19:16:25 guenther Exp $ */
/*
* ++Copyright++ 1983, 1993
@@ -71,6 +71,16 @@
#define ntohl(x) __htobe32(x)
#endif
+#ifndef _UINT16_T_DEFINED_
+#define _UINT16_T_DEFINED_
+typedef __uint16_t uint16_t;
+#endif
+
+#ifndef _UINT32_T_DEFINED_
+#define _UINT32_T_DEFINED_
+typedef __uint32_t uint32_t;
+#endif
+
#ifndef _SOCKLEN_T_DEFINED_
#define _SOCKLEN_T_DEFINED_
typedef __socklen_t socklen_t; /* length type for network syscalls */