From f053e8372b4870e88b9eacf63a69c32c0c878aea Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 12 Apr 2023 14:53:37 -0400 Subject: [PATCH] Build fix: common: eventfd only exists on Linux MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The project fails to build on non-Linux platforms since eventfd is a Linux-exclusive facility. From the project's point of view, the eventfd util belongs in libcommon. However, we will need to write a wrapper if it ends up being used on non-Linux platform. For the moment, exclude it from the internal libcommon sources when building on non-Linux platforms as it is only used on the session daemon. Signed-off-by: Jérémie Galarneau Change-Id: If528ac522d72a95e87a4f496531ea679a81030a2 --- src/common/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index e04b38347..2b6e06864 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -73,7 +73,6 @@ libcommon_lgpl_la_SOURCES = \ error-query.cpp \ evaluation.cpp \ event.cpp \ - eventfd.hpp eventfd.cpp \ event-expr/event-expr.cpp \ event-field-value.cpp \ event-rule/event-rule.cpp \ @@ -120,6 +119,10 @@ libcommon_lgpl_la_SOURCES = \ urcu.hpp \ utils.cpp utils.hpp +if IS_LINUX +libcommon_lgpl_la_SOURCES += eventfd.cpp eventfd.hpp +endif + if HAVE_ELF_H libcommon_lgpl_la_SOURCES += \ lttng-elf.cpp lttng-elf.hpp -- 2.34.1