eventfd.cpp: Remove the scope resolution operator
PATCH 1/1 eventfd.cpp: Remove the scope resolution operator
From: Mingli Yu <[email protected]>
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 <[email protected]>
--- src/common/eventfd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
src/common/eventfd.cpp +2 -2
@@ -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);
Signature · 1 line
2.34.1
Merged in master and stable-2.14, thanks!
Jérémie
Quoted 36 lines · mingli.yu--- via lttng-dev
From: Mingli Yu <[email protected]>
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 <[email protected]>--- src/common/eventfd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)src/common/eventfd.cpp +2
-2@@ -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);Signature · 1 line
2.34.1