summaryrefslogtreecommitdiff
path: root/include/errno.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/errno.h')
-rw-r--r--include/errno.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/errno.h b/include/errno.h
index f1b93a881b..aae94de296 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -21,13 +21,15 @@ extern int rtld_errno attribute_hidden;
# include <tls.h>
-# undef errno
-# ifndef NOT_IN_libc
-# define errno __libc_errno
-# else
-# define errno errno /* For #ifndef errno tests. */
-# endif
+# if !(defined __GNU__ && defined IS_IN_rtld)
+# undef errno
+# ifndef NOT_IN_libc
+# define errno __libc_errno
+# else
+# define errno errno /* For #ifndef errno tests. */
+# endif
extern __thread int errno attribute_tls_model_ie;
+# endif
# endif /* !NOT_IN_libc || IN_LIB */