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
This commit is contained in:
volker
2009-11-18 00:11:32 +00:00
parent 6ae9438738
commit 3fa2bb9a9b
+4
View File
@@ -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