From: Rich Felker Date: Tue, 22 Feb 2011 04:00:52 +0000 (-0500) Subject: change errno to static linkage (improves PIC code generation) X-Git-Tag: v0.7.0~62 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=71e6be641fb1e4080c2bb901e83423546d0ad5af;p=oweals%2Fmusl.git change errno to static linkage (improves PIC code generation) --- 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; }