aboutsummaryrefslogtreecommitdiffstats
path: root/event.c
diff options
context:
space:
mode:
authorvolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-11-18 00:11:32 +0000
committervolker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2009-11-18 00:11:32 +0000
commit3fa2bb9a9bd49174694fc5bb63bad85bb7e35829 (patch)
treea4aa10253936be578719411591a046b25e897178 /event.c
parent6ae9438738d02ceb411c90b05e7f5860e57d183e (diff)
downloadlcd4linux-3fa2bb9a9bd49174694fc5bb63bad85bb7e35829.tar.gz
ppoll() is not available in glibc before 2.4
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@1059 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'event.c')
-rw-r--r--event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/event.c b/event.c
index 6398b7d..10919e4 100644
--- a/event.c
+++ b/event.c
@@ -123,7 +123,11 @@ int event_process(const struct timespec *timeout)
j++;
}
}
+#if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 4)
int ready = ppoll(fds, j, timeout, NULL);
+#else
+ int ready = poll(fds, j, timeout->tv_sec * 1000000 + timeout->tv_nsec / 1000000);
+#endif
if (ready > 0) {
//search the file descriptors, call all relavant callbacks