python-treq: bump to version 16.12.0
[buildroot-gz.git] / package / aiccu / 0005-res-ninit.patch
blobfaf38df08d1d45df7c67176726329ea1167a0f94
1 res_ninit is available in glibc but not in uclibc or musl.
3 Signed-off-by: Alex Suykov <alex.suykov@gmail.com>
5 --- aiccu/common/resolver.c
6 +++ aiccu/common/resolver.c
7 @@ -26,7 +26,7 @@
9 int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
11 -#ifdef _LINUX
12 +#if defined(__GLIBC__) && !defined(__UCLIBC__)
13 struct __res_state res;
14 #endif
15 unsigned char answer[8192];
16 @@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype
17 uint16_t type = 0, class = 0;
18 uint32_t ttl = 0;
20 -#ifdef _LINUX
21 +#if defined(__GLIBC__) && !defined(__UCLIBC__)
22 memset(&res, 0, sizeof(res));
23 res.options = RES_DEBUG;
24 res_ninit(&res);
25 @@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype
26 #endif
28 memset(answer, 0, sizeof(answer));
29 -#ifdef _LINUX
30 +#if defined(__GLIBC__) && !defined(__UCLIBC__)
31 ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
32 #else
33 ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));