gethostname: Ensure declaration on NonStop Kernel.
authorBruno Haible <bruno@clisp.org>
Fri, 24 Dec 2010 15:39:10 +0000 (16:39 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 24 Dec 2010 15:39:10 +0000 (16:39 +0100)
* lib/unistd.in.h: Include <netdb.h> also on NonStop Kernel systems.
Reported by Joachim Schmitz <jojo@schmitz-digital.de>.

ChangeLog
lib/unistd.in.h

index ed375b6a49d537d65c21cf8e491bc8d58eeffa0b..3abaad082516716ab8563bcf56288463586f054f 100644 (file)
--- 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.
index 1dd06bfa61ab450645532ce5f63d0b7db7c3f369..6fe77230ef2fe17622b2d16821b0deeea72ae5ad 100644 (file)
 # 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