about summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/Versions15
-rw-r--r--resolv/gethnamaddr.c3
2 files changed, 16 insertions, 2 deletions
diff --git a/resolv/Versions b/resolv/Versions
index 668f643363..ab6a386802 100644
--- a/resolv/Versions
+++ b/resolv/Versions
@@ -1,7 +1,11 @@
+%include <tls.h>
+
 libc {
   GLIBC_2.0 {
+%if !(USE_TLS && HAVE___THREAD)
     # global variables
     _h_errno; _res;
+%endif
 
     # helper functions
     __h_errno_location;
@@ -10,7 +14,10 @@ libc {
     __res_randomid;
 
     # variables in normal name space
-    h_errlist; h_errno; h_nerr;
+    h_errlist; h_nerr;
+%if !(USE_TLS && HAVE___THREAD)
+    h_errno;
+%endif
 
     # h*
     herror; hstrerror;
@@ -22,6 +29,12 @@ libc {
     # r*
     __res_state; __res_init; __res_nclose; __res_ninit; _res_hconf;
   }
+  GLIBC_2.3 {
+%if USE_TLS && HAVE___THREAD
+    # This version is for the TLS symbol, GLIBC_2.0 is the old object symbol.
+    h_errno; _res;
+%endif
+  }
   GLIBC_PRIVATE {
     __gai_sigqueue;
   }
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c
index 8236b144a8..1ab102b420 100644
--- a/resolv/gethnamaddr.c
+++ b/resolv/gethnamaddr.c
@@ -633,7 +633,8 @@ gethostbyaddr(addr, len, af)
 	const u_char *uaddr = (const u_char *)addr;
 	static const u_char mapped[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0xff,0xff };
 	static const u_char tunnelled[] = { 0,0, 0,0, 0,0, 0,0, 0,0, 0,0 };
-	int n, size;
+	int n;
+	socklen_t size;
 	querybuf buf;
 	register struct hostent *hp;
 	char qbuf[MAXDNAME+1], *qp = NULL;