From b0af263838058420b5fafa4dc3ac6a1d6f7b3b3e Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Sat, 22 Oct 2016 09:01:07 -0600 Subject: [PATCH] fix build on OpenBSD --- CMakeLists.txt | 3 ++- ares.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b3aa87e5..698ad7b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -460,7 +460,8 @@ IF (HAVE_GETSERVBYPORT_R) # TODO : Should probably autodetect IF (CMAKE_SYSTEM_NAME STREQUAL "SunOS") SET (GETSERVBYPORT_R_ARGS 5) - ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "AIX") + ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "AIX" OR + CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") SET (GETSERVBYPORT_R_ARGS 4) ELSE () # Probably linux diff --git a/ares.h b/ares.h index cbd30f64..8c80f074 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(__OpenBSD__) #include #endif #if (defined(NETWARE) && !defined(__NOVELL_LIBC__))