Define IPPORT_RESERVED in netdb.h for XPG4 and UNIX98 (bug 14838)

Joseph S. Myers joseph@codesourcery.com
Tue Nov 13 17:40:00 GMT 2012


As noted in bug 14838, netdb.h is missing the IPPORT_RESERVED
definition for XPG4 and UNIX98, so causing conform/ test failures for
those standards.  This patch fixes this in the obvious way.  Tested
x86_64.

2012-11-13  Joseph Myers  <joseph@codesourcery.com>

	[BZ #14838]
	* resolv/netdb.h [__USE_XOPEN_EXTENDED] (IPPORT_RESERVED): Define
	macro.

diff --git a/resolv/netdb.h b/resolv/netdb.h
index 19bcc87..41cf06f 100644
--- a/resolv/netdb.h
+++ b/resolv/netdb.h
@@ -76,7 +76,7 @@ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
 # define NO_ADDRESS	NO_DATA	/* No address, look for MX record.  */
 #endif
 
-#ifdef __USE_XOPEN2K
+#if defined __USE_XOPEN2K || defined __USE_XOPEN_EXTENDED
 /* Highest reserved Internet port number.  */
 # define IPPORT_RESERVED	1024
 #endif

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list