summaryrefslogtreecommitdiff
path: root/ev.c
diff options
context:
space:
mode:
authorroot <root>2009-06-29 04:41:34 +0000
committerroot <root>2009-06-29 04:41:34 +0000
commit68aeda203bfd3a3e4a5577dc0ada8155a7a12223 (patch)
tree0b5d613504fc8db75dfedcd922d1a7b8435853e6 /ev.c
parent6a30e750dc5b7dd735094e3ddbf06efa5cdc930b (diff)
*** empty log message ***
Diffstat (limited to 'ev.c')
-rw-r--r--ev.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/ev.c b/ev.c
index 2b1f8f4..4ca68a4 100644
--- a/ev.c
+++ b/ev.c
@@ -59,6 +59,8 @@ extern "C" {
# define EV_USE_MONOTONIC 1
# endif
# endif
+# elif !defined(EV_USE_CLOCK_SYSCALL)
+# define EV_USE_CLOCK_SYSCALL 0
# endif
# if HAVE_CLOCK_GETTIME
@@ -326,9 +328,14 @@ extern "C" {
/* which makes programs even slower. might work on other unices, too. */
#if EV_USE_CLOCK_SYSCALL
# include <syscall.h>
-# define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts))
-# undef EV_USE_MONOTONIC
-# define EV_USE_MONOTONIC 1
+# ifdef SYS_clock_gettime
+# define clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts))
+# undef EV_USE_MONOTONIC
+# define EV_USE_MONOTONIC 1
+# else
+# undef EV_USE_CLOCK_SYSCALL
+# define EV_USE_CLOCK_SYSCALL 0
+# endif
#endif
#if EV_USE_EVENTFD