diff options
author | jilles <jilles@FreeBSD.org> | 2014-10-29 23:10:48 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2014-10-29 23:10:48 +0000 |
commit | 2b4fb093044897c573e0f1cfe28d235e8c83db08 (patch) | |
tree | 8cc89349a2300b1df09238c155ec4c6a5b5d2feb /sys/netinet | |
parent | 971ac59143ef0c48c1585ad311940038c45aee98 (diff) | |
download | FreeBSD-src-2b4fb093044897c573e0f1cfe28d235e8c83db08.zip FreeBSD-src-2b4fb093044897c573e0f1cfe28d235e8c83db08.tar.gz |
MFC r266842: netinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in
strict POSIX mode.
Put the htonl(), htons(), ntohl() and ntohs() declarations under
__POSIX_VISIBLE >= 200112. POSIX.1-2001 and newer require these to be
exposed from <netinet/in.h> (as well as <arpa/inet.h>).
Note that it may be unnecessary to check __POSIX_VISIBLE >= 200112 because
older versions of POSIX and the C standard do not define this header.
However, other places in the same file already perform the check.
PR: 188316
Submitted by: Christian Neukirchen
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 003bb7c..fa4cebe 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -100,7 +100,7 @@ struct sockaddr_in { char sin_zero[8]; }; -#if !defined(_KERNEL) && __BSD_VISIBLE +#if !defined(_KERNEL) && __POSIX_VISIBLE >= 200112 #ifndef _BYTEORDER_PROTOTYPED #define _BYTEORDER_PROTOTYPED @@ -120,7 +120,7 @@ __END_DECLS #define ntohs(x) __ntohs(x) #endif -#endif /* !_KERNEL && __BSD_VISIBLE */ +#endif /* !_KERNEL && __POSIX_VISIBLE >= 200112 */ #if __POSIX_VISIBLE >= 200112 #define IPPROTO_IPV6 41 /* IP6 header */ |