build: simplify *ifaddr handling
We really just want to skip this when building for Windows. So do that, and remove the two header checks (we also already use both of these headers, unguarded, in the !windows part of the codebase). Squash the two *iffaddrs defines into one, as I haven't seen an iffaddrs.h that implements one, but not the other.
This commit is contained in:
7 files changed
+12
-21
No files matched your search
@@ -4,7 +4,6 @@
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
include(CheckCXXSymbolExists)
|
||||
include(CheckIncludeFileCXX)
|
||||
|
||||
check_cxx_symbol_exists(O_CLOEXEC "fcntl.h" HAVE_O_CLOEXEC)
|
||||
check_cxx_symbol_exists(fdatasync "unistd.h" HAVE_FDATASYNC)
|
||||
@@ -12,9 +11,7 @@ check_cxx_symbol_exists(fork "unistd.h" HAVE_DECL_FORK)
|
||||
check_cxx_symbol_exists(pipe2 "unistd.h" HAVE_DECL_PIPE2)
|
||||
check_cxx_symbol_exists(setsid "unistd.h" HAVE_DECL_SETSID)
|
||||
|
||||
check_include_file_cxx(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file_cxx(ifaddrs.h HAVE_IFADDRS_H)
|
||||
if(HAVE_SYS_TYPES_H AND HAVE_IFADDRS_H)
|
||||
if(NOT WIN32)
|
||||
include(TestAppendRequiredLibraries)
|
||||
test_append_socket_library(core_interface)
|
||||
endif()
|
||||
|
||||
Reference in new issue
Block a user