strerror_r: fix missing header
authorEric Blake <eblake@redhat.com>
Tue, 24 May 2011 20:30:38 +0000 (14:30 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 24 May 2011 20:30:38 +0000 (14:30 -0600)
snprintf is not guaranteed to work without a declaration.

* lib/strerror_r.c: Avoid compiler warning about snprintf.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/strerror_r.c

index 2f31f7d..3dc7091 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-05-24  Eric Blake  <eblake@redhat.com>
 
+       strerror_r: fix missing header
+       * lib/strerror_r.c: Avoid compiler warning about snprintf.
+
        strerror_r: fix AIX test failures
        * lib/strerror_r.c (strerror_r): Convert silent truncation to
        ERANGE failure.
index 034c22e..494b1f0 100644 (file)
@@ -26,6 +26,7 @@
 #include <string.h>
 
 #include <errno.h>
+#include <stdio.h>
 
 #if GNULIB_defined_ESOCK /* native Windows platforms */
 # if HAVE_WINSOCK2_H