[Pommed-commits] [SCM] pommed - hotkeys handler for Apple laptops branch, master, updated. 1.25-6-ga77b40d
Julien BLACHE
jb at jblache.org
Fri Mar 6 10:43:15 UTC 2009
The following commit has been merged in the master branch:
commit a77b40d2c410bd2b6d00405a3ac08989d35c65d8
Author: Julien BLACHE <jb at jblache.org>
Date: Fri Mar 6 11:42:05 2009 +0100
Check for sys/timerfd.h availability on newer glibc.
Use the timerfd.h header shipped by newer glibc if available, keep our
own header for backward-compatibility.
diff --git a/pommed/Makefile b/pommed/Makefile
index 7917684..b99636f 100644
--- a/pommed/Makefile
+++ b/pommed/Makefile
@@ -16,7 +16,9 @@ CONFUSE_LIBS = $(shell pkg-config libconfuse --libs)
INOTIFY_CFLAGS = $(shell test -e /usr/include/sys/inotify.h || echo -DNO_SYS_INOTIFY_H)
-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS)
+TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H)
+
+CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(ALSA_CFLAGS) $(AUDIOFILE_CFLAGS) $(CONFUSE_CFLAGS) $(INOTIFY_CFLAGS) $(TIMERFD_CFLAGS)
LDFLAGS = -pthread -lrt $(DBUS_LIBS) $(ALSA_LIBS) $(AUDIOFILE_LIBS) $(CONFUSE_LIBS)
diff --git a/pommed/evloop.c b/pommed/evloop.c
index dcd83a1..dcd29a2 100644
--- a/pommed/evloop.c
+++ b/pommed/evloop.c
@@ -31,7 +31,11 @@
#include <sys/epoll.h>
-#include "timerfd-syscalls.h"
+#ifndef NO_SYS_TIMERFD_H
+# include <sys/timerfd.h>
+#else
+# include "timerfd-syscalls.h"
+#endif
#include "pommed.h"
#include "evloop.h"
diff --git a/wmpomme/Makefile b/wmpomme/Makefile
index f295ed8..4139cc0 100644
--- a/wmpomme/Makefile
+++ b/wmpomme/Makefile
@@ -3,7 +3,9 @@ CC = gcc
DBUS_CFLAGS = $(shell pkg-config dbus-1 --cflags) -DDBUS_API_SUBJECT_TO_CHANGE
DBUS_LIBS = $(shell pkg-config dbus-1 --libs)
-CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS)
+TIMERFD_CFLAGS = $(shell test -e /usr/include/sys/timerfd.h || echo -DNO_SYS_TIMERFD_H)
+
+CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(TIMERFD_CFLAGS)
LDFLAGS = -lrt -lXpm -lXext -lX11 $(DBUS_LIBS)
SOURCES = wmgeneral.c wmpomme.c \
diff --git a/wmpomme/wmpomme.c b/wmpomme/wmpomme.c
index dae78de..587d387 100644
--- a/wmpomme/wmpomme.c
+++ b/wmpomme/wmpomme.c
@@ -47,7 +47,11 @@
#include <dbus/dbus.h>
-#include "timerfd-syscalls.h"
+#ifndef NO_SYS_TIMERFD_H
+# include <sys/timerfd.h>
+#else
+# include "timerfd-syscalls.h"
+#endif
#include "wmgeneral.h"
#include "wmpomme-master.xpm"
--
pommed - hotkeys handler for Apple laptops
More information about the Pommed-commits
mailing list