changeset 14012:55491ce6972d

gethostname: Ensure declaration on NonStop Kernel. * lib/unistd.in.h: Include <netdb.h> also on NonStop Kernel systems. Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
author Bruno Haible <bruno@clisp.org>
date Fri, 24 Dec 2010 16:39:10 +0100
parents 68009ff4e161
children 6738ca181bba
files ChangeLog lib/unistd.in.h
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-24  Bruno Haible  <bruno@clisp.org>
+
+	gethostname: Ensure declaration on NonStop Kernel.
+	* lib/unistd.in.h: Include <netdb.h> also on NonStop Kernel systems.
+	Reported by Joachim Schmitz <jojo@schmitz-digital.de>.
+
 2010-12-24  Bruno Haible  <bruno@clisp.org>
 
 	sys_select: Ensure all necessary types on NonStop Kernel.
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -88,9 +88,11 @@
 # include <io.h>
 #endif
 
-/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.  */
+/* AIX and OSF/1 5.1 declare getdomainname in <netdb.h>, not in <unistd.h>.
+   NonStop Kernel declares gethostname in <netdb.h>, not in <unistd.h>.  */
 /* But avoid namespace pollution on glibc systems.  */
-#if @GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__) \
+#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \
+     || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \
     && !defined __GLIBC__
 # include <netdb.h>
 #endif