diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-21 23:00:52 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-21 23:00:52 -0500 |
commit | 71e6be641fb1e4080c2bb901e83423546d0ad5af (patch) | |
tree | d626e6f2356cb7dac46cdbc3b7685515972401df | |
parent | 8cd48f0965c8b362ae21ec93528ba64a25a18b7f (diff) | |
download | musl-71e6be641fb1e4080c2bb901e83423546d0ad5af.tar.gz musl-71e6be641fb1e4080c2bb901e83423546d0ad5af.tar.xz musl-71e6be641fb1e4080c2bb901e83423546d0ad5af.zip |
change errno to static linkage (improves PIC code generation)
-rw-r--r-- | src/errno/__errno_location.c | 6 |
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; } |