diff options
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/bits/libc-tsd.h | 3 | ||||
-rw-r--r-- | sysdeps/generic/errno-loc.c | 6 | ||||
-rw-r--r-- | sysdeps/generic/errno.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/generic/bits/libc-tsd.h b/sysdeps/generic/bits/libc-tsd.h index cc2c2c1219..d39382952a 100644 --- a/sysdeps/generic/bits/libc-tsd.h +++ b/sysdeps/generic/bits/libc-tsd.h @@ -52,7 +52,8 @@ translate directly into variables by macro magic. */ #if USE___THREAD -# define __libc_tsd_define(CLASS, KEY) CLASS __thread void *__libc_tsd_##KEY; +# define __libc_tsd_define(CLASS, KEY) \ + CLASS __thread void *__libc_tsd_##KEY attribute_tls_model_ie; # define __libc_tsd_address(KEY) (&__libc_tsd_##KEY) # define __libc_tsd_get(KEY) (__libc_tsd_##KEY) diff --git a/sysdeps/generic/errno-loc.c b/sysdeps/generic/errno-loc.c index bda9fa4211..032b48306c 100644 --- a/sysdeps/generic/errno-loc.c +++ b/sysdeps/generic/errno-loc.c @@ -20,11 +20,9 @@ #include <errno.h> #include <tls.h> -#undef errno -#if USE_TLS && HAVE___THREAD -extern __thread int errno; -#else +#if !(USE_TLS && HAVE___THREAD) +#undef errno extern int errno; #endif diff --git a/sysdeps/generic/errno.c b/sysdeps/generic/errno.c index cba5ab9c3b..e33c6b88ad 100644 --- a/sysdeps/generic/errno.c +++ b/sysdeps/generic/errno.c @@ -23,6 +23,8 @@ #if USE___THREAD __thread int errno; +extern __thread int __libc_errno __attribute__ ((alias ("errno"))) + attribute_hidden; #else /* This differs from plain `int errno;' in that it doesn't create a common definition, but a plain symbol that resides in .bss, |