[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: Fri, 21 Sep 2018 06:53:19 +0000 (UTC)
commit 4f4c6daaf3f85a39decc42539a90926512a86b52
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 | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/meson.build b/meson.build
index 2fd30cbd..e882d42c 100644
--- a/meson.build
+++ b/meson.build
@@ -125,6 +125,9 @@ if enable_gudev
endif
config_h.set('HAVE_GUDEV', enable_gudev)
+has_timerfd_create = cc.has_function('timerfd_create')
+config_h.set10('HAVE_TIMERFD', has_timerfd_create)
+
# 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]