From owner-svn-src-head@FreeBSD.ORG Thu May 29 15:23:38 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32FC9C43; Thu, 29 May 2014 15:23:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20BC62577; Thu, 29 May 2014 15:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4TFNbro061962; Thu, 29 May 2014 15:23:37 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4TFNbO8061961; Thu, 29 May 2014 15:23:37 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201405291523.s4TFNbO8061961@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 29 May 2014 15:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266842 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 15:23:38 -0000 Author: jilles Date: Thu May 29 15:23:37 2014 New Revision: 266842 URL: http://svnweb.freebsd.org/changeset/base/266842 Log: 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 (as well as ). 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: head/sys/netinet/in.h Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Thu May 29 14:51:52 2014 (r266841) +++ head/sys/netinet/in.h Thu May 29 15:23:37 2014 (r266842) @@ -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 */