blob: d4b46d3a5a29875f4ccb88e12ec77a36c0b263b4 [file] [edit]
From d94d2b90c5148c4d83f1424b6e984044f2d8191f Mon Sep 17 00:00:00 2001
From: Mingli Yu <mingli.yu@windriver.com>
Date: Thu, 24 Jul 2025 14:35:51 +0800
Subject: [PATCH] Fix: eventfd.cpp: Remove the scope resolution operator
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
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;
| | ^~~~~~~~~~~~~
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I405f6f15a25f7e6b7f0676093091a9e8a384739d
Upstream: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff;h=d94d2b90c5148c4d83f1424b6e984044f2d8191f
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
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 d331bbe40..447520f25 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.47.3