From 71e6be641fb1e4080c2bb901e83423546d0ad5af Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 21 Feb 2011 23:00:52 -0500 Subject: change errno to static linkage (improves PIC code generation) --- src/errno/__errno_location.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/errno/__errno_location.c') 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 #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; } -- cgit v1.2.1