fa3bfd
Backport of this upstream commit:
fa3bfd
fa3bfd
commit 7f9d00341057eb80b43fa83956b8d7798b4dabea
fa3bfd
Author: Roland McGrath <roland@hack.frob.com>
fa3bfd
Date:   Tue Aug 27 11:09:33 2013 -0700
fa3bfd
fa3bfd
    Clean up h_errno declaration to use __thread unconditionally.
fa3bfd
fa3bfd
Adjusted for the IS_IN changes, which were applied upstream after this
fa3bfd
commit (and downstream before its backport).
fa3bfd
fa3bfd
diff --git a/include/netdb.h b/include/netdb.h
fa3bfd
index 3b24747fd5df6562..b6d7b90bbf8abd2e 100644
fa3bfd
--- a/include/netdb.h
fa3bfd
+++ b/include/netdb.h
fa3bfd
@@ -5,17 +5,12 @@
fa3bfd
 /* Macros for accessing h_errno from inside libc.  */
fa3bfd
 # if IS_IN_LIB
fa3bfd
 #  undef  h_errno
fa3bfd
-#  ifdef _LIBC_REENTRANT
fa3bfd
-#   include <tls.h>
fa3bfd
-#   if IS_IN (libc)
fa3bfd
-#    define h_errno __libc_h_errno
fa3bfd
-#   else
fa3bfd
-#    define h_errno h_errno	/* For #ifndef h_errno tests.  */
fa3bfd
-#   endif
fa3bfd
-extern __thread int h_errno attribute_tls_model_ie;
fa3bfd
+#  if IS_IN (libc)
fa3bfd
+#   define h_errno __libc_h_errno
fa3bfd
 #  else
fa3bfd
-extern int h_errno;
fa3bfd
-#  endif	/* _LIBC_REENTRANT */
fa3bfd
+#   define h_errno h_errno	/* For #ifndef h_errno tests.  */
fa3bfd
+#  endif
fa3bfd
+extern __thread int h_errno attribute_tls_model_ie;
fa3bfd
 # endif /* IS_IN_LIB */
fa3bfd
 # define __set_h_errno(x) (h_errno = (x))
fa3bfd