diff options
-rw-r--r-- | meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-Remove-whitespace-in-operator-_json.patch | 52 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch | 35 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-packet-Initialize-m_ExternalRawData-in-IDnsResource-.patch | 34 | ||||
-rw-r--r-- | meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_24.09.bb (renamed from meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb) | 7 |
4 files changed, 55 insertions, 73 deletions
diff --git a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-Remove-whitespace-in-operator-_json.patch b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-Remove-whitespace-in-operator-_json.patch new file mode 100644 index 0000000000..fb793548a2 --- /dev/null +++ b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-Remove-whitespace-in-operator-_json.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 16974cb6a9f10fbd08db964ee0d9f074ef430db6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Mar 2025 11:55:12 -0800 | ||
4 | Subject: [PATCH] Remove whitespace in operator"" _json | ||
5 | |||
6 | Clang 20+ errors about this whitespace. | ||
7 | |||
8 | Fixes | ||
9 | git/3rdParty/json/include/json.hpp:24428:58: error: identifier '_json' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] | ||
10 | 24428 | using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) | ||
11 | | ~~~~~~~~~~~~^~~~~ | ||
12 | | operator""_json | ||
13 | |||
14 | Upstream-Status: Backport [ Its fixed in json import post 2024.9 release ] | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | 3rdParty/json/include/json.hpp | 8 ++++---- | ||
18 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
19 | |||
20 | diff --git a/3rdParty/json/include/json.hpp b/3rdParty/json/include/json.hpp | ||
21 | index 60ba1df..6eceb7c 100644 | ||
22 | --- a/3rdParty/json/include/json.hpp | ||
23 | +++ b/3rdParty/json/include/json.hpp | ||
24 | @@ -24353,7 +24353,7 @@ inline namespace json_literals | ||
25 | /// @brief user-defined string literal for JSON values | ||
26 | /// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json/ | ||
27 | JSON_HEDLEY_NON_NULL(1) | ||
28 | -inline nlohmann::json operator "" _json(const char* s, std::size_t n) | ||
29 | +inline nlohmann::json operator ""_json(const char* s, std::size_t n) | ||
30 | { | ||
31 | return nlohmann::json::parse(s, s + n); | ||
32 | } | ||
33 | @@ -24361,7 +24361,7 @@ inline nlohmann::json operator "" _json(const char* s, std::size_t n) | ||
34 | /// @brief user-defined string literal for JSON pointer | ||
35 | /// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json_pointer/ | ||
36 | JSON_HEDLEY_NON_NULL(1) | ||
37 | -inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) | ||
38 | +inline nlohmann::json::json_pointer operator ""_json_pointer(const char* s, std::size_t n) | ||
39 | { | ||
40 | return nlohmann::json::json_pointer(std::string(s, n)); | ||
41 | } | ||
42 | @@ -24425,8 +24425,8 @@ inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC | ||
43 | } // namespace std | ||
44 | |||
45 | #if JSON_USE_GLOBAL_UDLS | ||
46 | - using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) | ||
47 | - using nlohmann::literals::json_literals::operator "" _json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers) | ||
48 | + using nlohmann::literals::json_literals::operator ""_json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) | ||
49 | + using nlohmann::literals::json_literals::operator ""_json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers) | ||
50 | #endif | ||
51 | |||
52 | // #include <nlohmann/detail/macro_unscope.hpp> | ||
diff --git a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch deleted file mode 100644 index f2e210fc67..0000000000 --- a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 298dec6f87061914c85049faca3d0ff3310d1794 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 6 May 2024 12:15:30 -0700 | ||
4 | Subject: [PATCH] initialize timespec variable | ||
5 | |||
6 | Fixes build warnings with GCC14 | ||
7 | |||
8 | /mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux/pcapplusplus/23.09/git/Packet++/src/RawPacket.cpp: In constructor 'pcpp::RawPacket::RawPacket(const uint8_t*, int, timeval, bool, pcpp::LinkLayerType)': | ||
9 | /mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux/pcapplusplus/23.09/git/Packet++/src/RawPacket.cpp:23:18: error: 'nsec_time.timespec::<anonymous>' is used uninitialized [-Werror=uninitialized] | ||
10 | 23 | timespec nsec_time; | ||
11 | | ^~~~~~~~~ | ||
12 | cc1plus: all warnings being treated as errors | ||
13 | |||
14 | Upstream-Status: Submitted [https://github.com/seladb/PcapPlusPlus/pull/1389] | ||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | --- | ||
17 | Packet++/src/RawPacket.cpp | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/Packet++/src/RawPacket.cpp b/Packet++/src/RawPacket.cpp | ||
21 | index 8ad52d52..07dbbbe2 100644 | ||
22 | --- a/Packet++/src/RawPacket.cpp | ||
23 | +++ b/Packet++/src/RawPacket.cpp | ||
24 | @@ -20,7 +20,7 @@ void RawPacket::init(bool deleteRawDataAtDestructor) | ||
25 | |||
26 | RawPacket::RawPacket(const uint8_t* pRawData, int rawDataLen, timeval timestamp, bool deleteRawDataAtDestructor, LinkLayerType layerType) | ||
27 | { | ||
28 | - timespec nsec_time; | ||
29 | + timespec nsec_time = {}; | ||
30 | TIMEVAL_TO_TIMESPEC(×tamp, &nsec_time); | ||
31 | init(deleteRawDataAtDestructor); | ||
32 | setRawData(pRawData, rawDataLen, nsec_time, layerType); | ||
33 | -- | ||
34 | 2.45.0 | ||
35 | |||
diff --git a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-packet-Initialize-m_ExternalRawData-in-IDnsResource-.patch b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-packet-Initialize-m_ExternalRawData-in-IDnsResource-.patch deleted file mode 100644 index b6389e0e3f..0000000000 --- a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-packet-Initialize-m_ExternalRawData-in-IDnsResource-.patch +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | From 742f564ee80749e9f1f3363092775545e37c0f87 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 9 May 2024 17:02:09 -0700 | ||
4 | Subject: [PATCH] packet++: Initialize m_ExternalRawData in IDnsResource | ||
5 | constructor | ||
6 | |||
7 | Fixes following warning with GCC-14 | ||
8 | |||
9 | Packet++/src/DnsResource.cpp:29:24: error: '*this.pcpp::IDnsResource::m_ExternalRawData' may be used uninitialized [-Werror=maybe-uninitialized] | ||
10 | 29 | return m_ExternalRawData; | ||
11 | | ^~~~~~~~~~~~~~~~~ | ||
12 | |||
13 | Upstream-Status: Submitted [https://github.com/seladb/PcapPlusPlus/pull/1391] | ||
14 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
15 | --- | ||
16 | Packet++/src/DnsResource.cpp | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/Packet++/src/DnsResource.cpp b/Packet++/src/DnsResource.cpp | ||
20 | index fec1bf05..c1f97041 100644 | ||
21 | --- a/Packet++/src/DnsResource.cpp | ||
22 | +++ b/Packet++/src/DnsResource.cpp | ||
23 | @@ -10,7 +10,7 @@ namespace pcpp | ||
24 | { | ||
25 | |||
26 | IDnsResource::IDnsResource(DnsLayer* dnsLayer, size_t offsetInLayer) | ||
27 | - : m_DnsLayer(dnsLayer), m_OffsetInLayer(offsetInLayer), m_NextResource(nullptr) | ||
28 | + : m_DnsLayer(dnsLayer), m_OffsetInLayer(offsetInLayer), m_NextResource(nullptr), m_ExternalRawData(nullptr) | ||
29 | { | ||
30 | char decodedName[4096]; | ||
31 | m_NameLength = decodeName((const char*)getRawData(), decodedName); | ||
32 | -- | ||
33 | 2.45.0 | ||
34 | |||
diff --git a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_24.09.bb index 9db0222172..7979094a0b 100644 --- a/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb +++ b/meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_24.09.bb | |||
@@ -8,10 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f" | |||
8 | DEPENDS = "libpcap" | 8 | DEPENDS = "libpcap" |
9 | 9 | ||
10 | SRC_URI = "git://github.com/seladb/PcapPlusPlus.git;protocol=https;branch=master \ | 10 | SRC_URI = "git://github.com/seladb/PcapPlusPlus.git;protocol=https;branch=master \ |
11 | file://0001-packet-Initialize-m_ExternalRawData-in-IDnsResource-.patch \ | 11 | file://0001-Remove-whitespace-in-operator-_json.patch \ |
12 | file://0001-initialize-timespec-variable.patch" | 12 | " |
13 | 13 | SRCREV = "4af4b8b04e6d5dd40b8e69cc30c5c1f62e7fe368" | |
14 | SRCREV = "4cf8ed44f9dd145f874dc1dd747dfefcfcab75be" | ||
15 | 14 | ||
16 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
17 | 16 | ||