From e55548b105365c00bf68a13d66809a1f15b1386d Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 8 Aug 2024 12:51:41 -0400 Subject: [PATCH] Fix Haiku. --- deps/c-ares_config/ares_build.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/deps/c-ares_config/ares_build.h b/deps/c-ares_config/ares_build.h index 49037906..2ea9a63b 100644 --- a/deps/c-ares_config/ares_build.h +++ b/deps/c-ares_config/ares_build.h @@ -34,7 +34,7 @@ #define CARES_TYPEOF_ARES_SSIZE_T ssize_t #endif -#if !defined(__ANDROID__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__OpenBSD__) +#if !defined(__ANDROID__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__OpenBSD__) && !defined(__HAIKU__) #define GETSERVBYNAME_R_ARGS 6 #define GETSERVBYPORT_R_ARGS 6 #define HAVE_GETSERVBYNAME_R 1 @@ -42,16 +42,18 @@ #define HAVE_PIPE2 1 #endif -#if defined(__OpenBSD__) +#if defined(__OpenBSD__) || defined(__HAIKU__) #define GETSERVBYNAME_R_ARGS 4 #define GETSERVBYPORT_R_ARGS 4 #endif #if !defined(__APPLE__) && !defined(_WIN32) && !defined(__OpenBSD__) #define HAVE_MALLOC_H 1 +#if !defined(__HAIKU__) +#define HAVE_SYS_RANDOM_H 1 #define HAVE_EPOLL 1 #define HAVE_SYS_EPOLL_H 1 -#define HAVE_SYS_RANDOM_H 1 +#endif #endif #if !defined(__WIN32) @@ -83,7 +85,9 @@ #define HAVE_GETENV 1 #define HAVE_GETHOSTNAME 1 #define HAVE_GETNAMEINFO 1 +#if !defined(__HAIKU__) #define HAVE_GETRANDOM 1 +#endif #define HAVE_GETTIMEOFDAY 1 #define HAVE_IF_INDEXTONAME 1 #define HAVE_IF_NAMETOINDEX 1 @@ -134,7 +138,9 @@ #define HAVE_IFADDRS_H 1 #define HAVE_UNISTD_H 1 #define HAVE_WRITEV 1 +#if !defined(__HAIKU__) #define HAVE_ARC4RANDOM_BUF 1 +#endif #define HAVE_GETIFADDRS 1 #define HAVE_STAT 1 #define CARES_RANDOM_FILE "/dev/urandom"