summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/features.h8
-rw-r--r--include/netdb.h5
2 files changed, 13 insertions, 0 deletions
diff --git a/include/features.h b/include/features.h
index 0af6bf43b..07d19f1f5 100644
--- a/include/features.h
+++ b/include/features.h
@@ -280,6 +280,14 @@
# define __GLIBC_MINOR__ 2
#endif
+/*
+ * NPTL requires this to be defined. Unfortunately, due to complexities
+ * in include dependencies, this cannot be defined on a per file basis.
+ */
+#ifdef __PTHREADS_NATIVE__
+# define __USE_XOPEN2K 1
+#endif
+
/* Convenience macros to test the versions of glibc and gcc.
Use them like this:
#if __GNUC_PREREQ (2,8)
diff --git a/include/netdb.h b/include/netdb.h
index 4a48d0b97..c047c7fe7 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -53,8 +53,13 @@
__BEGIN_DECLS
+#include <tls.h>
+#ifdef USE___THREAD
+extern __thread int h_errno attribute_tls_model_ie;
+#else
/* Error status for non-reentrant lookup functions. */
extern int h_errno;
+#endif
/* Function to get address of global `h_errno' variable. */
extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));