Date: Wed, 29 Oct 2014 23:10:49 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273841 - stable/10/sys/netinet Message-ID: <201410292310.s9TNAnlo021091@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Wed Oct 29 23:10:48 2014 New Revision: 273841 URL: https://svnweb.freebsd.org/changeset/base/273841 Log: 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 Modified: stable/10/sys/netinet/in.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/in.h ============================================================================== --- stable/10/sys/netinet/in.h Wed Oct 29 22:55:16 2014 (r273840) +++ stable/10/sys/netinet/in.h Wed Oct 29 23:10:48 2014 (r273841) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410292310.s9TNAnlo021091>