Make the gethostname test compile again.
authorBruno Haible <bruno@clisp.org>
Sun, 2 Aug 2009 13:29:02 +0000 (15:29 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 2 Aug 2009 13:29:02 +0000 (15:29 +0200)
ChangeLog
tests/test-gethostname.c

index ee140460f37fe4e6c73222e663eefb29b937a10e..d0308b91e738f2b52c0e077106065f78b88e760b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,7 +4,8 @@
        Ensure HOST_NAME_MAX as part of the gethostname module.
        * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms,
        define also HOST_NAME_MAX.
        Ensure HOST_NAME_MAX as part of the gethostname module.
        * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms,
        define also HOST_NAME_MAX.
-       * tests/test-gethostname.c (main): Check also HOST_NAME_MAX.
+       * tests/test-gethostname.c: Include <limits.h>.
+       (main): Check also HOST_NAME_MAX.
        * doc/posix-headers/limits.texi: Document the mingw problem.
 
 2009-08-02  Bruno Haible  <bruno@clisp.org>
        * doc/posix-headers/limits.texi: Document the mingw problem.
 
 2009-08-02  Bruno Haible  <bruno@clisp.org>
index c1914fd9125ba9cc3e52bd486f7790a854133faf..3ab0b86af53b7fb3f9b0a483a978539235145a2e 100644 (file)
 
 #include <config.h>
 
 
 #include <config.h>
 
+/* Get gethostname() declaration.  */
 #include <unistd.h>
 #include <unistd.h>
+/* Get HOST_NAME_MAX definition.  */
+#include <limits.h>
 
 #include <stdio.h>
 #include <string.h>
 
 #include <stdio.h>
 #include <string.h>