From 0c1419ef8f9f44505eb183e8548d90542ddc7de1 Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Wed, 30 Oct 2013 15:41:17 -0600
Subject: applying patch c_ares-1.10.0.patch


diff --git a/ares.h b/ares.h
index 9b3f376..b871032 100644
--- a/ares.h
+++ b/ares.h
@@ -38,7 +38,7 @@
    require it! */
 #if defined(_AIX) || defined(__NOVELL_LIBC__) || defined(__NetBSD__) || \
     defined(__minix) || defined(__SYMBIAN32__) || defined(__INTEGRITY) || \
-    defined(ANDROID) || defined(__ANDROID__)
+    defined(ANDROID) || defined(__ANDROID__) || defined(__HAIKU__)
 #include <sys/select.h>
 #endif
 #if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
diff --git a/ares_private.h b/ares_private.h
index ab5be5a..b884fda 100644
--- a/ares_private.h
+++ b/ares_private.h
@@ -65,6 +65,11 @@
 
 #define PATH_HOSTS             "InetDBase:Hosts"
 
+#elif defined(__HAIKU__)
+
+#define PATH_RESOLV_CONF        "/boot/system/settings/network/resolv.conf"
+#define PATH_HOSTS              "/boot/system/settings/network/hosts"
+
 #else
 
 #define PATH_RESOLV_CONF        "/etc/resolv.conf"
-- 
1.8.3.4


From 3287466624c281088ae83001e96e9391d0f5b97d Mon Sep 17 00:00:00 2001
From: Chris Roberts <cpr420@gmail.com>
Date: Wed, 30 Oct 2013 15:52:39 -0600
Subject: Search for libnetwork


diff --git a/configure.ac b/configure.ac
index 5c02450..423ce64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,6 +222,15 @@ then
                ])
 fi
 
+if test "$HAVE_GETHOSTBYNAME" != "1"
+then
+  dnl gethostbyname in the network lib?
+  AC_CHECK_LIB(network, gethostbyname,
+               [HAVE_GETHOSTBYNAME="1"
+               LIBS="$LIBS -lnetwork"
+               ])
+fi
+
 dnl At least one system has been identified to require BOTH nsl and socket
 dnl libs at the same time to link properly.
 if test "$HAVE_GETHOSTBYNAME" != "1"
-- 
1.8.3.4

