about summary refs log tree commit diff
path: root/misc/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc/error.c')
-rw-r--r--misc/error.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/misc/error.c b/misc/error.c
index ca7f3b47b8..2af2cc5b90 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -157,7 +157,10 @@ error (status, errnum, message, va_alist)
     {
 #if defined HAVE_STRERROR_R || defined _LIBC
       char errbuf[1024];
-      fprintf (stderr, ": %s", __strerror_r (errnum, errbuf, sizeof errbuf));
+      /* Don't use __strerror_r's return value because on some systems
+	 (at least DEC UNIX 4.0[A-D]) strerror_r returns `int'.  */
+      __strerror_r (errnum, errbuf, sizeof errbuf);
+      fprintf (stderr, ": %s", errbuf);
 #else
       fprintf (stderr, ": %s", strerror (errnum));
 #endif