diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/misc/internals/__errno_location.c | 3 | ||||
-rw-r--r-- | libc/misc/internals/__h_errno_location.c | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/errno.h | 1 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/uClibc_errno.h | 3 |
4 files changed, 8 insertions, 0 deletions
diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c index 71c5461a7..aec7641ce 100644 --- a/libc/misc/internals/__errno_location.c +++ b/libc/misc/internals/__errno_location.c @@ -15,3 +15,6 @@ __errno_location (void) { return &errno; } +#ifdef IS_IN_libc /* not really need, only to keep in sync w/ libc_hidden_proto */ +libc_hidden_weak(__errno_location) +#endif diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c index 235df4ec6..213d39894 100644 --- a/libc/misc/internals/__h_errno_location.c +++ b/libc/misc/internals/__h_errno_location.c @@ -10,3 +10,4 @@ int * weak_const_function __h_errno_location (void) { return &h_errno; } +libc_hidden_weak(__h_errno_location) diff --git a/libc/sysdeps/linux/common/bits/errno.h b/libc/sysdeps/linux/common/bits/errno.h index de9688ac1..0bf6354fb 100644 --- a/libc/sysdeps/linux/common/bits/errno.h +++ b/libc/sysdeps/linux/common/bits/errno.h @@ -43,6 +43,7 @@ # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); +libc_hidden_proto(__errno_location) # ifdef __UCLIBC_HAS_THREADS__ /* When using threads, errno is a per-thread value. */ diff --git a/libc/sysdeps/linux/common/bits/uClibc_errno.h b/libc/sysdeps/linux/common/bits/uClibc_errno.h index 79eb7e6bd..9c1561841 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_errno.h +++ b/libc/sysdeps/linux/common/bits/uClibc_errno.h @@ -33,6 +33,9 @@ extern int *__errno_location (void) __THROW __attribute__ ((__const__)) ; # if defined __UCLIBC_HAS_THREADS__ # include <tls.h> +# if defined USE___THREAD && USE___THREAD +libc_hidden_proto(__errno_location) +# endif # endif #endif /* !__ASSEMBLER__ */ |