| diff -Naur libicsneo-orig/CMakeLists.txt libicsneo/CMakeLists.txt |
| --- libicsneo-orig/CMakeLists.txt 2018-12-28 10:06:35.987140700 +0300 |
| +++ libicsneo/CMakeLists.txt 2018-12-28 12:51:19.912189600 +0300 |
| @@ -6,6 +6,7 @@ |
| include(GNUInstallDirs) |
| |
| set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") |
| +option(BUILD_DOCUMENTATION "Create and install the HTML based API documentation (requires Doxygen)" OFF) |
| |
| # macOS Homebrew Boost Fix |
| if(NOT MSVC) |
| @@ -36,6 +37,7 @@ |
| add_definitions(-DWPCAP -DHAVE_REMOTE -DWIN32_LEAN_AND_MEAN) |
| endif(WIN32) |
| |
| +if(BUILD_DOCUMENTATION) |
| # doxygen |
| find_package(Doxygen) |
| if(DOXYGEN_FOUND) |
| @@ -83,6 +85,7 @@ |
| DEPENDS icsneocpp icsneoc icsneolegacy) |
| endif() |
| endif() |
| +endif() |
| |
| if(WIN32) |
| file(GLOB PLATFORM_SRC_EXTERNAL ${CMAKE_CURRENT_SOURCE_DIR}/platform/windows/*.cpp) |
| @@ -133,6 +133,11 @@ |
| api/icsneocpp/version.cpp |
| ${SRC_FILES} |
| ) |
| + |
| +if(MINGW) |
| + target_link_libraries(icsneocpp iphlpapi) |
| +endif() |
| + |
| target_include_directories(icsneocpp |
| PUBLIC |
| $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> |
| diff -Naur libicsneo-orig/platform/windows/pcap.cpp libicsneo/platform/windows/pcap.cpp |
| --- libicsneo-orig/platform/windows/pcap.cpp 2018-12-28 10:06:36.876342200 +0300 |
| +++ libicsneo/platform/windows/pcap.cpp 2018-12-28 12:45:16.975152000 +0300 |
| @@ -8,7 +8,12 @@ |
| #include <codecvt> |
| #include <chrono> |
| #include <iostream> |
| +#include <locale> |
| +#include <vector> |
| |
| +#ifdef __MINGW32__ |
| +#undef interface |
| +#endif |
| using namespace icsneo; |
| |
| static std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter; |
| diff -Naur libicsneo-orig/platform/windows/registry.cpp libicsneo/platform/windows/registry.cpp |
| --- libicsneo-orig/platform/windows/registry.cpp 2018-12-28 10:06:36.876342200 +0300 |
| +++ libicsneo/platform/windows/registry.cpp 2018-12-28 12:45:59.376026400 +0300 |
| @@ -1,5 +1,6 @@ |
| #include "icsneo/platform/windows/registry.h" |
| #include <codecvt> |
| +#include <locale> |
| #include <vector> |
| |
| using namespace icsneo; |
| diff -Naur libicsneo-orig/third-party/winpcap/include/pcap-stdinc.h libicsneo/third-party/winpcap/include/pcap-stdinc.h |
| --- libicsneo-orig/third-party/winpcap/include/pcap-stdinc.h 2018-12-28 10:06:37.063542500 +0300 |
| +++ libicsneo/third-party/winpcap/include/pcap-stdinc.h 2018-12-28 12:19:15.799409700 +0300 |
| @@ -60,7 +60,7 @@ |
| |
| #define caddr_t char* |
| |
| -#if _MSC_VER < 1500 |
| +#if defined(_MSC_VER) && (_MSC_VER < 1500) |
| #define snprintf _snprintf |
| #define vsnprintf _vsnprintf |
| #define strdup _strdup |