From 3fa2bb9a9bd49174694fc5bb63bad85bb7e35829 Mon Sep 17 00:00:00 2001 From: volker Date: Wed, 18 Nov 2009 00:11:32 +0000 Subject: 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 --- event.c | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit v1.2.3