diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e71090..fdc2109 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,11 +10,6 @@ include(GNUInstallDirs) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") -# macOS Homebrew Boost Fix -if(NOT MSVC) - include_directories(AFTER /usr/local/include) -endif() - # Enable Warnings if(MSVC) # Force to always compile with W4 diff --git a/platform/posix/pcap.cpp b/platform/posix/pcap.cpp index 9df9ad1..9773ff8 100644 --- a/platform/posix/pcap.cpp +++ b/platform/posix/pcap.cpp @@ -8,7 +8,9 @@ #include #include #include +#ifndef __APPLE__ #include +#endif using namespace icsneo; @@ -52,12 +54,16 @@ std::vector PCAP::FindAll() { pcap_addr* currentAddress = dev->addresses; bool hasAddress = false; while(!hasAddress && currentAddress != nullptr) { +#ifndef __APPLE__ if(currentAddress->addr && currentAddress->addr->sa_family == AF_PACKET) { struct sockaddr_ll* s = (struct sockaddr_ll*)currentAddress->addr; memcpy(netif.macAddress, s->sll_addr, sizeof(netif.macAddress)); hasAddress = true; break; } +#else + //TODO: get adapter address on macOS +#endif currentAddress = currentAddress->next; }