summaryrefslogtreecommitdiff
path: root/lib/strtol.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strtol.c')
-rw-r--r--lib/strtol.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/strtol.c b/lib/strtol.c
index 08ef0a479b..d7854e63ee 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -20,6 +20,9 @@
#include <ctype.h>
#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
#if HAVE_LIMITS_H
#include <limits.h>
@@ -42,7 +45,6 @@
#include <stdlib.h>
#else
#define NULL 0
-extern int errno;
#endif
#ifndef UNSIGNED