summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-09-21 17:29:12 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2013-03-29 10:30:21 +0100
commit60e5c34fe39232b5f92bad60d986fda29e4ba05f (patch)
tree7fefda164559b5573b9d370416d8c1c70db3c732 /libc/inet
parent946799cd0ce0c6c803c9cb173a84f4d607bde350 (diff)
inet: fix getting the nameserver from _res state after res_init.
Fixes displaying the nameserver in busybox nslookup. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/resolv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index 4777977fe..ffd3fe8c4 100644
--- a/libc/inet/resolv.c
+++ b/libc/inet/resolv.c
@@ -3645,11 +3645,11 @@ res_init(void)
*/
if (!_res.id)
_res.id = res_randomid();
- __res_sync = res_sync_func;
__UCLIBC_MUTEX_UNLOCK(__resolv_lock);
__res_vinit(&_res, 1);
+ __res_sync = res_sync_func;
return 0;
}