From ce931ad5f5aba60e8e77f39e0af43bce7d25d287 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 4 Mar 2024 11:05:25 -0500
Subject: [PATCH] keep nodejs compatible with c-ares 1.17.1

Upstream-Status: Inappropriate [c-ares specific]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 src/cares_wrap.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/cares_wrap.h b/src/cares_wrap.h
index 021ef1c9..820c5d88 100644
--- a/src/cares_wrap.h
+++ b/src/cares_wrap.h
@@ -23,7 +23,15 @@
 # include <netdb.h>
 #endif  // __POSIX__
 
-# include <ares_nameser.h>
+#if defined(__ANDROID__) || \
+    defined(__MINGW32__) || \
+    defined(__OpenBSD__) || \
+    defined(_MSC_VER)
+
+# include <nameser.h>
+#else
+# include <arpa/nameser.h>
+#endif
 
 namespace node {
 namespace cares_wrap {
