toolchain/uClibc: fix getting the nameserver from _res state after res_init. fixes...
[openwrt.git] / toolchain / uClibc / patches-0.9.33.2 / 132-inet_fix_res_init.patch
1 --- a/libc/inet/resolv.c
2 +++ b/libc/inet/resolv.c
3 @@ -3654,11 +3654,11 @@ res_init(void)
4          */
5         if (!_res.id)
6                 _res.id = res_randomid();
7 -       __res_sync = res_sync_func;
8  
9         __UCLIBC_MUTEX_UNLOCK(__resolv_lock);
10  
11         __res_vinit(&_res, 1);
12 +       __res_sync = res_sync_func;
13  
14         return 0;
15  }