diff --git a/packages/p/pcapplusplus/patches/v24.09/explicit-override.patch b/packages/p/pcapplusplus/patches/v24.09/explicit-override.patch new file mode 100644 index 000000000..d73aab3fe --- /dev/null +++ b/packages/p/pcapplusplus/patches/v24.09/explicit-override.patch @@ -0,0 +1,44 @@ +diff --git a/Pcap++/header/WinPcapLiveDevice.h b/Pcap++/header/WinPcapLiveDevice.h +index 9cc5a501..816a96cf 100644 +--- a/Pcap++/header/WinPcapLiveDevice.h ++++ b/Pcap++/header/WinPcapLiveDevice.h +@@ -1,10 +1,8 @@ + #pragma once + +-#if defined(_WIN32) +- + /// @file + +-# include "PcapLiveDevice.h" ++#include "PcapLiveDevice.h" + + /** + * \namespace pcpp +@@ -34,17 +32,17 @@ namespace pcpp + WinPcapLiveDevice& operator=(const WinPcapLiveDevice& other); + + public: +- virtual LiveDeviceType getDeviceType() const ++ LiveDeviceType getDeviceType() const override + { + return WinPcapDevice; + } + + bool startCapture(OnPacketArrivesCallback onPacketArrives, void* onPacketArrivesUserCookie, + int intervalInSecondsToUpdateStats, OnStatsUpdateCallback onStatsUpdate, +- void* onStatsUpdateUserCookie); ++ void* onStatsUpdateUserCookie) override; + bool startCapture(int intervalInSecondsToUpdateStats, OnStatsUpdateCallback onStatsUpdate, +- void* onStatsUpdateUserCookie); +- bool startCapture(RawPacketVector& capturedPacketsVector) ++ void* onStatsUpdateUserCookie) override; ++ bool startCapture(RawPacketVector& capturedPacketsVector) override + { + return PcapLiveDevice::startCapture(capturedPacketsVector); + } +@@ -76,5 +74,3 @@ namespace pcpp + }; + + } // namespace pcpp +- +-#endif // _WIN32 diff --git a/packages/p/pcapplusplus/xmake.lua b/packages/p/pcapplusplus/xmake.lua index 9943e7663..22be10e27 100644 --- a/packages/p/pcapplusplus/xmake.lua +++ b/packages/p/pcapplusplus/xmake.lua @@ -10,6 +10,7 @@ package("pcapplusplus") add_versions("v23.09", "f2b92d817df6138363be0d144a61716f8ecc43216f0008135da2e0e15727d35a") add_patches("v24.09", "patches/v24.09/vla.patch", "8c380468c78118b6d85f6b3856cd49c4d890fd326dde3400b8c47c01c885cef4") + add_patches("v24.09", "patches/v24.09/explicit-override.patch", "d4ff15e920ea4996f6d3105e898e42d75cfab47b7e930467442ae356a361cf25") add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true}) @@ -34,6 +35,7 @@ package("pcapplusplus") local configs = { "-DPCAPPP_BUILD_EXAMPLES=OFF", "-DPCAPPP_BUILD_TESTS=OFF", + "--compile-no-warning-as-error", } table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) import("package.tools.cmake").install(package, configs)