* [PATCH] eventfd.cpp: Remove the scope resolution operator
@ 2025-07-24 6:35 mingli.yu--- via lttng-dev
2025-08-18 19:16 ` Jérémie Galarneau via lttng-dev
0 siblings, 1 reply; 2+ messages in thread
From: mingli.yu--- via lttng-dev @ 2025-07-24 6:35 UTC (permalink / raw)
To: lttng-dev
From: Mingli Yu <mingli.yu@windriver.com>
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>
---
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.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] eventfd.cpp: Remove the scope resolution operator
2025-07-24 6:35 [PATCH] eventfd.cpp: Remove the scope resolution operator mingli.yu--- via lttng-dev
@ 2025-08-18 19:16 ` Jérémie Galarneau via lttng-dev
0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau via lttng-dev @ 2025-08-18 19:16 UTC (permalink / raw)
To: lttng-dev
Merged in master and stable-2.14, thanks!
Jérémie
On Thu, Jul 24, 2025 at 02:35:51PM +0800, mingli.yu--- via lttng-dev wrote:
> From: Mingli Yu <mingli.yu@windriver.com>
>
> 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>
> ---
> 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.34.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-18 19:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-24 6:35 [PATCH] eventfd.cpp: Remove the scope resolution operator mingli.yu--- via lttng-dev
2025-08-18 19:16 ` Jérémie Galarneau via lttng-dev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.