[gnome-settings-daemon/wip/timerfd] build: Define HAVE_TIMERFD if we have timerfd_create
- From: Iain Lane <iainl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/timerfd] build: Define HAVE_TIMERFD if we have timerfd_create
- Date: Tue, 18 Sep 2018 08:03:17 +0000 (UTC)
commit a2fb9129ac564a8af802002e7237dd05eca21320
Author: Iain Lane <iainl gnome org>
Date: Tue Sep 18 08:23:30 2018 +0100
build: Define HAVE_TIMERFD if we have timerfd_create
If we have timerfd support we will use it to wake up at the appropriate
time. There is a fallback non-timerfd path in which we wake up every
second.
The problem is that we had forgotten to ever check for timerfd support.
Add a check to the build system which enables this if timerfd_create()
exists.
Closes: #77
meson.build | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/meson.build b/meson.build
index 2fd30cbd..93fab26f 100644
--- a/meson.build
+++ b/meson.build
@@ -125,6 +125,10 @@ if enable_gudev
endif
config_h.set('HAVE_GUDEV', enable_gudev)
+if cc.has_function('timerfd_create')
+ config_h.set('HAVE_TIMERFD', 1)
+endif
+
# Check for libwayland-client
enable_wayland = get_option('wayland')
if enable_wayland
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]