Fix compilation error on mingw.
authorBruno Haible <bruno@clisp.org>
Sun, 2 Aug 2009 18:55:40 +0000 (20:55 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 2 Aug 2009 18:55:40 +0000 (20:55 +0200)
ChangeLog
lib/gethostname.c

index d0308b91e738f2b52c0e077106065f78b88e760b..f3fa7d50f77d9cfc7331b8c4cea3f2071723702c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-08-02  Bruno Haible  <bruno@clisp.org>
+
+       * lib/gethostname.c: Include limits.h.
+       Reported by Martin Lambers <marlam@marlam.de>.
+
 2009-08-02  Simon Josefsson  <simon@josefsson.org>
             Bruno Haible  <bruno@clisp.org>
 
index ef58a40313a42064235c3c54612573d6d0fda199..6259deba2797b530d26b845a5e674f75c7d78328 100644 (file)
@@ -76,6 +76,9 @@ gethostname (char *name, size_t len)
 /* Get winsock2.h. */
 #include <unistd.h>
 
+/* Get INT_MAX.  */
+#include <limits.h>
+
 /* Get set_winsock_errno. */
 #include "w32sock.h"