From: Guy Harris Date: Fri, 15 Sep 2017 10:02:53 +0000 (-0700) Subject: Don't add fad-${FINDALLDEVS_TYPE} if the capture type is null. X-Git-Tag: libpcap-1.9-bp~693 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/90bea1316ebbd60ffbff586d39090f67d5dc3365 Don't add fad-${FINDALLDEVS_TYPE} if the capture type is null. The "find all devices" routine for the "null" capture type - which does nothing as there aren't any regular-interface capture devices - is in pcap-null.c; there's no separate fad-null.c. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d596819a..197874d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -503,13 +503,11 @@ if(NOT WIN32) # UN*X - figure out what type of interface list mechanism we # have. # - if(PCAP_TYPE STREQUAL "null") - # - # We can't capture, so we can't open any capture - # devices, so we won't return any interfaces. - # - set(FINDALLDEVS_TYPE null) - else() + # If the capture type is null, that means we can't capture, + # so we can't open any capture devices, so we won't return + # any interfaces. + # + if(NOT PCAP_TYPE STREQUAL "null") check_function_exists(getifaddrs HAVE_GETIFADDRS) if(NOT HAVE_GETIFADDRS) # @@ -582,9 +580,9 @@ if(NOT WIN32) set(FINDALLDEVS_TYPE gifc) endif() endif() + message(STATUS "Find-interfaces mechanism type: ${FINDALLDEVS_TYPE}") + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} fad-${FINDALLDEVS_TYPE}.c) endif() - message(STATUS "Find-interfaces mechanism type: ${FINDALLDEVS_TYPE}") - set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} fad-${FINDALLDEVS_TYPE}.c) endif() file(GLOB PROJECT_SOURCE_LIST_CORE_H