build: Fix building error for c-ares library on macOS
In macOS SDK, <arpa/nameser.h> always exists but CHECK_INCLUDE_FILES
fails due to non-normal header installation on macOS SDK.
Recently, c-ares starts to provide nameser.h related interface:
The above commit causes definition conflicts on macOS that kicks
compilation error on c-ares.
@@ -458,6 +458,10 @@ FLB_OPTION(CARES_SHARED OFF)
FLB_OPTION(CARES_INSTALL OFF)
FLB_OPTION(CARES_BUILD_TESTS OFF)
FLB_OPTION(CARES_BUILD_TOOLS OFF)
+if (FLB_SYSTEM_MACOS)
+ # macOS SDK always has <arpa/nameser.h>.
+ FLB_DEFINITION(CARES_HAVE_ARPA_NAMESER_H)
+endif()
add_subdirectory(${FLB_PATH_LIB_CARES})# EXCLUDE_FROM_ALL)
# Chunk I/O
