aboutsummaryrefslogtreecommitdiffstats
path: root/main/aiccu/musl_does_not_have_res_ninit.patch
blob: 1934afbc5073771ff74dbf98934de06379782847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- aiccu/common/resolver.c
+++ aiccu.new/common/resolver.c
@@ -26,7 +26,7 @@
 
 int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
 {
-#ifdef _LINUX
+#ifdef __GLIBC__
 	struct __res_state	res;
 #endif
 	unsigned char		answer[8192];
@@ -38,7 +38,7 @@
 	uint16_t		type = 0, class = 0;
 	uint32_t		ttl = 0;
 
-#ifdef _LINUX
+#ifdef __GLIBC__
 	memset(&res, 0, sizeof(res));
 	res.options = RES_DEBUG;
 	res_ninit(&res);
@@ -47,7 +47,7 @@
 #endif
 
 	memset(answer, 0, sizeof(answer));
-#ifdef _LINUX
+#ifdef __GLIBC__
 	ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
 #else
 	ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));