aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/errno.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/generic/errno.c b/sysdeps/generic/errno.c
index e33c6b88ad..45c9639095 100644
--- a/sysdeps/generic/errno.c
+++ b/sysdeps/generic/errno.c
@@ -31,4 +31,15 @@ extern __thread int __libc_errno __attribute__ ((alias ("errno")))
which can have an alias. */
int errno __attribute__ ((section (".bss")));
strong_alias (errno, _errno)
+
+/* This alias is needed by libpthread. */
+strong_alias (errno, __libc_errno)
+
+/* We declare these with compat_symbol so that they are not
+ visible at link time. Programs must use the accessor functions. */
+# if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
+# include <shlib-compat.h>
+compat_symbol (libc, errno, errno, GLIBC_2_0);
+compat_symbol (libc, _errno, _errno, GLIBC_2_0);
+# endif
#endif