diff options
author | volker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2009-11-18 00:11:32 +0000 |
---|---|---|
committer | volker <volker@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2009-11-18 00:11:32 +0000 |
commit | 3fa2bb9a9bd49174694fc5bb63bad85bb7e35829 (patch) | |
tree | a4aa10253936be578719411591a046b25e897178 | |
parent | 6ae9438738d02ceb411c90b05e7f5860e57d183e (diff) | |
download | lcd4linux-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
-rw-r--r-- | event.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |