summaryrefslogtreecommitdiffstats
path: root/lib/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/error.c')
-rw-r--r--lib/error.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/error.c b/lib/error.c
index 797b697..42e2c6c 100644
--- a/lib/error.c
+++ b/lib/error.c
@@ -17,11 +17,14 @@
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
+#define sys_errlist sidestep_sys_errlist_declaration
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
+#include <errno.h>
#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
# if __STDC__
@@ -68,9 +71,8 @@ static char *
private_strerror (errnum)
int errnum;
{
-#if !HAVE_DECL_SYS_ERRLIST
+#undef sys_errlist
extern char *sys_errlist[];
-#endif
extern int sys_nerr;
if (errnum > 0 && errnum <= sys_nerr)