Files
infix/package/sysrepo-cpp/0006-fix-raw-strings-and-macros-break-gcc-13.patch

62 lines
1.9 KiB
Diff

From b943faea3cb00c5e86f21710647a2ca370e41f33 Mon Sep 17 00:00:00 2001
From: Edoardo Bortolozzo <edoardo.bortolozzo@thinkquantum.com>
Date: Fri, 24 Oct 2025 13:45:00 +0200
Subject: [PATCH 6/9] fix: raw strings and macros break gcc < 13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Organization: Wires
see bug report:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55971
Change-Id: I04afc2b3bee86a7e4b038b277aad0e3a150a1940
Signed-off-by: Mattias Walström <lazzer@gmail.com>
---
tests/subscriptions-dynamic.cpp | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/tests/subscriptions-dynamic.cpp b/tests/subscriptions-dynamic.cpp
index 5ed173b..561df0c 100644
--- a/tests/subscriptions-dynamic.cpp
+++ b/tests/subscriptions-dynamic.cpp
@@ -39,21 +39,28 @@
REQUIRE(pipeStatus((SUBSCRIPTION).fd(), -1) == PipeStatus::DataReady); \
(SUBSCRIPTION).processEvent(cbNotif);
-#define SUBSCRIPTION_TERMINATED(SUBSCRIPTION) R"({
+auto SUBSCRIPTION_TERMINATED(const auto& SUBSCRIPTION)
+{
+ return R"({
"ietf-subscribed-notifications:subscription-terminated": {
- "id": )" + std::to_string((SUBSCRIPTION).subscriptionId()) + R"(,
+ "id": )"
+ + std::to_string((SUBSCRIPTION).subscriptionId()) + R"(,
"reason": "no-such-subscription"
}
}
-)"
+)";
+};
-#define REPLAY_COMPLETED(SUBSCRIPTION) R"({
+auto REPLAY_COMPLETED(const auto& SUBSCRIPTION)
+{
+ return R"({
"ietf-subscribed-notifications:replay-completed": {
- "id": )" \
- + std::to_string((SUBSCRIPTION).subscriptionId()) + R"(
+ "id": )"
+ + std::to_string((SUBSCRIPTION).subscriptionId()) + R"(
}
}
-)"
+)";
+};
#define REQUIRE_YANG_PUSH_UPDATE(SUBSCRIPTION, NOTIFICATION) \
TROMPELOEIL_REQUIRE_CALL(rec, recordYangPushUpdate((SUBSCRIPTION).subscriptionId(), NOTIFICATION)).IN_SEQUENCE(seq);
--
2.43.0