diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-03-30 11:21:17 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-03-30 19:44:36 +0000 |
commit | 7181ae471345d4e4e85d5edd5341ff7f156de01d (patch) | |
tree | 90606dfc739646b62cef2dcd6f3d55d2b698ca70 /ConfigureChecks.cmake | |
parent | f341fd930e2b4a7787157bdb1447e00085f0680b (diff) |
Work around a Linux bonding driver bug (and the lack of a libpcap workaround).
The bonding driver does not properly handle unknown ioctls; it returns
ENODEV rather than ENOTSUP, EOPNOTSUPP, ENOTTY, or a "not supported"
error of that type. This causes problems detailed in bug 11058.
On Linux, check for bonding devices before checking for monitor-mode
support.
While we're at it, get rid of a commented-out include of
CheckCSourceCompiles (it's presumably already been implicitly included
by other functions that use it).
Bug: 11058
Change-Id: I13035de0650634c51a52f262829b2b6fb86b39e9
Reviewed-on: https://code.wireshark.org/review/7856
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
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. |