summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/netdb.h2
-rw-r--r--libc/misc/internals/__errno_location.c2
-rw-r--r--libc/misc/internals/__h_errno_location.c2
-rw-r--r--libc/sysdeps/linux/common/bits/errno.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/include/netdb.h b/include/netdb.h
index 14cf3d24d..8fdfa0fcc 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -59,7 +59,7 @@ __BEGIN_DECLS
/* Function to get address of global `h_errno' variable. */
extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
#ifdef _LIBC
-# ifndef __UCLIBC_HAS_TLS__
+# if !defined(__UCLIBC_HAS_TLS__) && !defined(__UCLIBC_HAS_THREADS__)
extern int weak_const_function *__h_errno_location(void);
# endif
#endif
diff --git a/libc/misc/internals/__errno_location.c b/libc/misc/internals/__errno_location.c
index dec913f30..be7a9093e 100644
--- a/libc/misc/internals/__errno_location.c
+++ b/libc/misc/internals/__errno_location.c
@@ -16,4 +16,4 @@ int *__errno_location(void)
{
return &errno;
}
-libc_hidden_def(__errno_location)
+libc_hidden_weak(__errno_location)
diff --git a/libc/misc/internals/__h_errno_location.c b/libc/misc/internals/__h_errno_location.c
index 41353d74a..6653681cb 100644
--- a/libc/misc/internals/__h_errno_location.c
+++ b/libc/misc/internals/__h_errno_location.c
@@ -16,4 +16,4 @@ int *__h_errno_location(void)
{
return &h_errno;
}
-libc_hidden_def(__h_errno_location)
+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 7ef1b9440..777338fb1 100644
--- a/libc/sysdeps/linux/common/bits/errno.h
+++ b/libc/sysdeps/linux/common/bits/errno.h
@@ -43,7 +43,7 @@
/* Function to get address of global `errno' variable. */
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
# ifdef _LIBC
-# ifndef __UCLIBC_HAS_TLS__
+# if !defined(__UCLIBC_HAS_TLS__) && !defined(__UCLIBC_HAS_THREADS__)
extern int weak_const_function *__errno_location(void);
# endif
# endif