libtoml11: Upgrade to 4.4.0
PATCH 1/2 libtoml11: Upgrade to 4.4.0
Fix build with clang-20 while here
Signed-off-by Khem Raj <[email protected]>
---
.../0001-Remove-whitespace-in-operator.patch | 46 +++++++++++++++++++
...{libtoml11_4.3.0.bb => libtoml11_4.4.0.bb} | 5 +-
2 files changed, 49 insertions(+), 2 deletions(-)
create mode 100644 meta-oe/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch
rename meta-oe/recipes-devtools/libtoml11/{libtoml11_4.3.0.bb => libtoml11_4.4.0.bb} (86%)meta-oe/recipes-devtools/libtoml11/files/0001-Remove-whitespace-in-operator.patch new file +46 -0
@@ -0,0 +1,46 @@ +From dee78f822d8a5b985e565e5c1ef42a59557aa8fc Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 7 Mar 2025 11:35:46 -0800 +Subject: [PATCH] Remove whitespace in operator"" + +Clang 20+ errors about this whitespace. + +Fixes +include/toml11/impl/../fwd/literal_fwd.hpp:22:26: error: identifier '_toml' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] +| 22 | ::toml::value operator"" _toml(const char* str, std::size_t len); +| | ~~~~~~~~~~~^~~~~ +| | operator""_toml + +Upstream-Status: Submitted [https://github.com/ToruNiina/toml11/pull/285] +Signed-off-by: Khem Raj <[email protected]> +--- + include/toml11/fwd/literal_fwd.hpp | 2 +- + include/toml11/impl/literal_impl.hpp | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/toml11/fwd/literal_fwd.hpp b/include/toml11/fwd/literal_fwd.hpp +index e46612c..82f62b7 100644 +--- a/include/toml11/fwd/literal_fwd.hpp ++++ b/include/toml11/fwd/literal_fwd.hpp +@@ -19,7 +19,7 @@ inline namespace literals + inline namespace toml_literals + { + +-::toml::value operator"" _toml(const char* str, std::size_t len); ++::toml::value operator""_toml(const char* str, std::size_t len); + + #if defined(TOML11_HAS_CHAR8_T) + // value of u8"" literal has been changed from char to char8_t and char8_t is +diff --git a/include/toml11/impl/literal_impl.hpp b/include/toml11/impl/literal_impl.hpp +index e8298c2..067d4ed 100644 +--- a/include/toml11/impl/literal_impl.hpp ++++ b/include/toml11/impl/literal_impl.hpp +@@ -115,7 +115,7 @@ inline namespace toml_literals + { + + TOML11_INLINE ::toml::value +-operator"" _toml(const char* str, std::size_t len) ++operator""_toml(const char* str, std::size_t len) + { + if(len == 0) + {
meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb renamed from meta-oe/recipes-devtools/libtoml11/libtoml11_4.3.0.bb +3 -2
@@ -11,13 +11,14 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=44d1fcf70c7aa6991533c38daf7befa3" PE = "1" -SRCREV = "499be3c177bcf9b42848d5d9567153e4edfcbc8a" -SRCREV_json = "9cca280a4d0ccf0c08f47a99aa71d1b0e52f8d03" +SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286" +SRCREV_json = "8c391e04fe4195d8be862c97f38cfe10e2a3472e" SRCREV_doctest = "ae7a13539fb71f270b87eb2e874fbac80bc8dda2" SRC_URI = "git://github.com/ToruNiina/toml11;branch=main;protocol=https \ git://github.com/nlohmann/json;destsuffix=git/tests/extlib/json;name=json;branch=develop;protocol=https \ git://github.com/doctest/doctest;destsuffix=git/tests/extlib/doctest;name=doctest;branch=master;protocol=https \ + file://0001-Remove-whitespace-in-operator.patch \ file://run-ptest \ " SRCREV_FORMAT = "json_doctest"
PATCH 2/2 pcapplusplus: Upgrade to 2024.09 release
Backport a fix for json to build with clang20
Signed-off-by Khem Raj <[email protected]>
---
...-Remove-whitespace-in-operator-_json.patch | 52 +++++++++++++++++++
.../0001-initialize-timespec-variable.patch | 35 -------------
...e-m_ExternalRawData-in-IDnsResource-.patch | 34 ------------
...lusplus_23.09.bb => pcapplusplus_24.09.bb} | 7 ++-
4 files changed, 55 insertions(+), 73 deletions(-)
create mode 100644 meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-Remove-whitespace-in-operator-_json.patch
delete mode 100644 meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch
delete mode 100644 meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-packet-Initialize-m_ExternalRawData-in-IDnsResource-.patch
rename meta-oe/recipes-connectivity/pcapplusplus/{pcapplusplus_23.09.bb => pcapplusplus_24.09.bb} (80%)meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-Remove-whitespace-in-operator-_json.patch new file +52 -0
@@ -0,0 +1,52 @@ +From 16974cb6a9f10fbd08db964ee0d9f074ef430db6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 7 Mar 2025 11:55:12 -0800 +Subject: [PATCH] Remove whitespace in operator"" _json + +Clang 20+ errors about this whitespace. + +Fixes +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] + 24428 | using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) + | ~~~~~~~~~~~~^~~~~ + | operator""_json + +Upstream-Status: Backport [ Its fixed in json import post 2024.9 release ] +Signed-off-by: Khem Raj <[email protected]> +--- + 3rdParty/json/include/json.hpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/3rdParty/json/include/json.hpp b/3rdParty/json/include/json.hpp +index 60ba1df..6eceb7c 100644 +--- a/3rdParty/json/include/json.hpp ++++ b/3rdParty/json/include/json.hpp +@@ -24353,7 +24353,7 @@ inline namespace json_literals + /// @brief user-defined string literal for JSON values + /// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json/ + JSON_HEDLEY_NON_NULL(1) +-inline nlohmann::json operator "" _json(const char* s, std::size_t n) ++inline nlohmann::json operator ""_json(const char* s, std::size_t n) + { + return nlohmann::json::parse(s, s + n); + } +@@ -24361,7 +24361,7 @@ inline nlohmann::json operator "" _json(const char* s, std::size_t n) + /// @brief user-defined string literal for JSON pointer + /// @sa https://json.nlohmann.me/api/basic_json/operator_literal_json_pointer/ + JSON_HEDLEY_NON_NULL(1) +-inline nlohmann::json::json_pointer operator "" _json_pointer(const char* s, std::size_t n) ++inline nlohmann::json::json_pointer operator ""_json_pointer(const char* s, std::size_t n) + { + return nlohmann::json::json_pointer(std::string(s, n)); + } +@@ -24425,8 +24425,8 @@ inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC + } // namespace std + + #if JSON_USE_GLOBAL_UDLS +- using nlohmann::literals::json_literals::operator "" _json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) +- using nlohmann::literals::json_literals::operator "" _json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers) ++ using nlohmann::literals::json_literals::operator ""_json; // NOLINT(misc-unused-using-decls,google-global-names-in-headers) ++ using nlohmann::literals::json_literals::operator ""_json_pointer; //NOLINT(misc-unused-using-decls,google-global-names-in-headers) + #endif + + // #include <nlohmann/detail/macro_unscope.hpp>
meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-initialize-timespec-variable.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From 298dec6f87061914c85049faca3d0ff3310d1794 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Mon, 6 May 2024 12:15:30 -0700 -Subject: [PATCH] initialize timespec variable - -Fixes build warnings with GCC14 - -/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)': -/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] - 23 | timespec nsec_time; - | ^~~~~~~~~ -cc1plus: all warnings being treated as errors - -Upstream-Status: Submitted [https://github.com/seladb/PcapPlusPlus/pull/1389] -Signed-off-by: Khem Raj <[email protected]> ---- - Packet++/src/RawPacket.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Packet++/src/RawPacket.cpp b/Packet++/src/RawPacket.cpp -index 8ad52d52..07dbbbe2 100644 ---- a/Packet++/src/RawPacket.cpp -+++ b/Packet++/src/RawPacket.cpp -@@ -20,7 +20,7 @@ void RawPacket::init(bool deleteRawDataAtDestructor) - - RawPacket::RawPacket(const uint8_t* pRawData, int rawDataLen, timeval timestamp, bool deleteRawDataAtDestructor, LinkLayerType layerType) - { -- timespec nsec_time; -+ timespec nsec_time = {}; - TIMEVAL_TO_TIMESPEC(×tamp, &nsec_time); - init(deleteRawDataAtDestructor); - setRawData(pRawData, rawDataLen, nsec_time, layerType); --- -2.45.0 -
meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus/0001-packet-Initialize-m_ExternalRawData-in-IDnsResource-.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 742f564ee80749e9f1f3363092775545e37c0f87 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Thu, 9 May 2024 17:02:09 -0700 -Subject: [PATCH] packet++: Initialize m_ExternalRawData in IDnsResource - constructor - -Fixes following warning with GCC-14 - -Packet++/src/DnsResource.cpp:29:24: error: '*this.pcpp::IDnsResource::m_ExternalRawData' may be used uninitialized [-Werror=maybe-uninitialized] - 29 | return m_ExternalRawData; - | ^~~~~~~~~~~~~~~~~ - -Upstream-Status: Submitted [https://github.com/seladb/PcapPlusPlus/pull/1391] -Signed-off-by: Khem Raj <[email protected]> ---- - Packet++/src/DnsResource.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Packet++/src/DnsResource.cpp b/Packet++/src/DnsResource.cpp -index fec1bf05..c1f97041 100644 ---- a/Packet++/src/DnsResource.cpp -+++ b/Packet++/src/DnsResource.cpp -@@ -10,7 +10,7 @@ namespace pcpp - { - - IDnsResource::IDnsResource(DnsLayer* dnsLayer, size_t offsetInLayer) -- : m_DnsLayer(dnsLayer), m_OffsetInLayer(offsetInLayer), m_NextResource(nullptr) -+ : m_DnsLayer(dnsLayer), m_OffsetInLayer(offsetInLayer), m_NextResource(nullptr), m_ExternalRawData(nullptr) - { - char decodedName[4096]; - m_NameLength = decodeName((const char*)getRawData(), decodedName); --- -2.45.0 -
meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_24.09.bb renamed from meta-oe/recipes-connectivity/pcapplusplus/pcapplusplus_23.09.bb +3 -4
@@ -8,10 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=911690f51af322440237a253d695d19f" DEPENDS = "libpcap" SRC_URI = "git://github.com/seladb/PcapPlusPlus.git;protocol=https;branch=master \ - file://0001-packet-Initialize-m_ExternalRawData-in-IDnsResource-.patch \ - file://0001-initialize-timespec-variable.patch" - -SRCREV = "4cf8ed44f9dd145f874dc1dd747dfefcfcab75be" + file://0001-Remove-whitespace-in-operator-_json.patch \ + " +SRCREV = "4af4b8b04e6d5dd40b8e69cc30c5c1f62e7fe368" S = "${WORKDIR}/git"