summaryrefslogtreecommitdiff
path: root/inet/herrno.c
diff options
context:
space:
mode:
Diffstat (limited to 'inet/herrno.c')
-rw-r--r--inet/herrno.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/inet/herrno.c b/inet/herrno.c
index 7e413adf7a..312760e81d 100644
--- a/inet/herrno.c
+++ b/inet/herrno.c
@@ -16,7 +16,19 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <features.h>
+
/* We need to have the error status variable of the resolver
accessible in the libc. */
-int h_errno;
+int __h_errno;
+strong_alias (__h_errno, h_errno)
+/* When threaded, h_errno may be a per-process variable. */
+#ifdef __USE_REENTRANT
+int
+weak_const_function
+__h_errno_location (void)
+{
+ return &__h_errno;
+}
+#endif