bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] strerror_r: fix missing header


From: Eric Blake
Subject: [PATCH] strerror_r: fix missing header
Date: Tue, 24 May 2011 14:31:50 -0600

snprintf is not guaranteed to work without a declaration.

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

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog        |    3 +++
 lib/strerror_r.c |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2f31f7d..3dc7091 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-05-24  Eric Blake  <address@hidden>

+       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.
diff --git a/lib/strerror_r.c b/lib/strerror_r.c
index 034c22e..494b1f0 100644
--- 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
-- 
1.7.4.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]