
---
 main/dns.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main/dns.c b/main/dns.c
index 2ef9799..0bc73f0 100644
--- a/main/dns.c
+++ b/main/dns.c
@@ -58,7 +58,7 @@
 #define DETERMINED_BYTE_ORDER __LITTLE_ENDIAN
 #endif
 
-#ifndef HAVE_RES_NINIT
+#if !defined(HAVE_RES_NINIT) || defined(__UCLIBC__)
 AST_MUTEX_DEFINE_STATIC(res_lock);
 #endif
 
@@ -232,7 +232,7 @@ static int dns_advance_field(unsigned char **dns_response, int remaining_len, in
 	return remaining_len;
 }
 
-#ifndef HAVE_RES_NINIT
+#if !defined(HAVE_RES_NINIT) || defined(__UCLIBC__)
 /*!
  * \brief Handles the DNS search if the system has RES_INIT.
  *
@@ -498,7 +498,7 @@ int ast_search_dns(void *context,
 	unsigned char answer[MAX_SIZE];
 	int res, ret = -1;
 
-#ifdef HAVE_RES_NINIT
+#if defined(HAVE_RES_NINIT) && !defined(__UCLIBC__)
 	memset(&dnsstate, 0, sizeof(dnsstate));
 	res_ninit(&dnsstate);
 	res = res_nsearch(&dnsstate, dname, class, type, answer, sizeof(answer));
-- 
2.25.1

