diff options
-rw-r--r-- | include/resolv.h | 2 | ||||
-rw-r--r-- | libc/inet/resolv.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/resolv.h b/include/resolv.h index 485b8db98..2a82641a4 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -457,7 +457,7 @@ __END_DECLS # ifndef NOT_IN_libc # define __resp __libc_resp # endif -# define _res (*__resp) +# define _res (*__res_state()) extern __thread struct __res_state *__resp attribute_tls_model_ie; # endif # else diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 8bbd7c7cd..cf170fba6 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -3344,7 +3344,7 @@ libc_hidden_def(dn_skipname) /* Will be called under __resolv_lock. */ static void res_sync_func(void) { - struct __res_state *rp = &(_res); + struct __res_state *rp = __res_state(); int n; /* If we didn't get malloc failure earlier... */ @@ -3896,7 +3896,7 @@ res_ninit(res_state statp) #endif /* L_res_init */ #ifdef L_res_state -# if defined __UCLIBC_HAS_TLS__ +# if !defined __UCLIBC_HAS_TLS__ struct __res_state * __res_state (void) { |