diff options
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 69ca619068..de25c64874 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -53,6 +53,35 @@ check_include_file("unistd.h" HAVE_UNISTD_H) check_include_file("windows.h" HAVE_WINDOWS_H) check_include_file("winsock2.h" HAVE_WINSOCK2_H) +# +# On Linux, check for some additional headers, which we need as a +# workaround for a bonding driver bug and for libpcap's current lack +# of its own workaround for that bug. +# +if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + # + # Those header files require <sys/socket.h>. + # + check_c_source_compiles( + "#include <sys/socket.h> + #include <linux/sockios.h> + int main(void) + { + return 0; + }" + HAVE_LINUX_SOCKIOS_H + ) + check_c_source_compiles( + "#include <sys/socket.h> + #include <linux/if_bonding.h> + int main(void) + { + return 0; + }" + HAVE_LINUX_IF_BONDING_H + ) +endif() + #Functions include(CheckFunctionExists) include(CheckSymbolExists) @@ -107,7 +136,6 @@ check_struct_has_member("struct tm" tm_zone time.h HAVE_TM_ZONE) check_symbol_exists(tzname "time.h" HAVE_TZNAME) # Check for stuff that isn't testable via the tests above -#include(CheckCSourceCompiles) # # *If* we found libnl, check if we can use nl80211 stuff with it. |