]> The Tcpdump Group git mirrors - libpcap/commitdiff
Don't add fad-${FINDALLDEVS_TYPE} if the capture type is null.
authorGuy Harris <[email protected]>
Fri, 15 Sep 2017 10:02:53 +0000 (03:02 -0700)
committerGuy Harris <[email protected]>
Fri, 15 Sep 2017 10:02:53 +0000 (03:02 -0700)
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.

CMakeLists.txt

index d596819ae9a2954bcec0033e5cee855db30b50f2..197874d45d1d181ade7eaa7aa75994d491f8e24b 100644 (file)
@@ -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