changeset 14818:280af315920c

strerror_r: fix missing header 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>
author Eric Blake <eblake@redhat.com>
date Tue, 24 May 2011 14:30:38 -0600
parents 2835cfc7d63e
children e3204c55066d
files ChangeLog lib/strerror_r.c
diffstat 2 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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.
--- a/lib/strerror_r.c
+++ b/lib/strerror_r.c
@@ -26,6 +26,7 @@
 #include <string.h>
 
 #include <errno.h>
+#include <stdio.h>
 
 #if GNULIB_defined_ESOCK /* native Windows platforms */
 # if HAVE_WINSOCK2_H