From: Mingli Yu Date: Thu, 24 Jul 2025 09:28:14 +0000 (+0800) Subject: lttng-tools: Remove the scope resolution operator X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster-next;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git lttng-tools: Remove the scope resolution operator Remove the scope resolution operator :: to fix the below build failure. | ../../../sources/lttng-tools-2.14.0/src/common/eventfd.cpp:18:31: error: expected id-expression before numeric constant | 18 | int flags = ::EFD_CLOEXEC; | | ^~~~~~~~~~~ | ../../../sources/lttng-tools-2.14.0/src/common/eventfd.cpp:21:36: error: expected id-expression before numeric constant | 21 | flags |= ::EFD_SEMAPHORE; | | (From OE-Core rev: db98c8943dde49bad30f24a58dcb5441ecf7e709) Signed-off-by: Mingli Yu Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-eventfd.cpp-Remove-the-scope-resolution-operator.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-eventfd.cpp-Remove-the-scope-resolution-operator.patch new file mode 100644 index 0000000000..02bd1d1db0 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/0001-eventfd.cpp-Remove-the-scope-resolution-operator.patch @@ -0,0 +1,41 @@ +From da83d31a8dd555c28eb27bd7a7d3c53b51d5f276 Mon Sep 17 00:00:00 2001 +From: Mingli Yu +Date: Sun, 20 Jul 2025 16:37:57 +0800 +Subject: [PATCH] eventfd.cpp: Remove the scope resolution operator + +Remove the scope resolution operator :: to fix the below build failure +with musl. + | ../../../sources/lttng-tools-2.14.0/src/common/eventfd.cpp:18:31: error: expected id-expression before numeric constant + | 18 | int flags = ::EFD_CLOEXEC; + | | ^~~~~~~~~~~ + | ../../../sources/lttng-tools-2.14.0/src/common/eventfd.cpp:21:36: error: expected id-expression before numeric constant + | 21 | flags |= ::EFD_SEMAPHORE; + | | ^~~~~~~~~~~~~ + +Upstream-Status: Pending [The message to lttng-dev awaits moderator approval] + +Signed-off-by: Mingli Yu +--- + src/common/eventfd.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/common/eventfd.cpp b/src/common/eventfd.cpp +index fe5b549..3379b0b 100644 +--- a/src/common/eventfd.cpp ++++ b/src/common/eventfd.cpp +@@ -15,10 +15,10 @@ + + lttng::eventfd::eventfd(bool use_semaphore_semantics, std::uint64_t initial_value) : + file_descriptor([use_semaphore_semantics, initial_value]() { +- int flags = ::EFD_CLOEXEC; ++ int flags = EFD_CLOEXEC; + + if (use_semaphore_semantics) { +- flags |= ::EFD_SEMAPHORE; ++ flags |= EFD_SEMAPHORE; + } + + const auto raw_fd = ::eventfd(initial_value, flags); +-- +2.34.1 + diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb index b746d3b6ca..03266db462 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb @@ -46,6 +46,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ file://lttng-sessiond.service \ file://disable-tests.patch \ file://0001-gen-ust-events-constructor-change-rpath-to-libdir-li.patch \ + file://0001-eventfd.cpp-Remove-the-scope-resolution-operator.patch \ " SRC_URI[sha256sum] = "d8c39c26cec13b7bd82551cd52a22efc358b888e36ebcf9c1b60ef1c3a3c2fd3"