about summary refs log tree commit diff
path: root/src/errno
diff options
context:
space:
mode:
Diffstat (limited to 'src/errno')
-rw-r--r--src/errno/__errno_location.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/errno/__errno_location.c b/src/errno/__errno_location.c
index 0a220b63..a0185780 100644
--- a/src/errno/__errno_location.c
+++ b/src/errno/__errno_location.c
@@ -1,11 +1,9 @@
 #include <errno.h>
 #include "libc.h"
 
-#undef errno
-int errno;
-
 int *__errno_location(void)
 {
+	static int e;
 	if (libc.errno_location) return libc.errno_location();
-	return &errno;
+	return &e;
 }