summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Plante <michael.plante@gmail.com>2010-01-24 14:39:59 -0600
committerPete Batard <pbatard@gmail.com>2010-01-24 22:52:40 +0000
commit04ff7aab6a01d4f47b9903ace4b2074809118e91 (patch)
tree8d870205a9ca9d51c051058def3d5ae1a2546273
parentc1978b395546cf23cba7ca120582d14e1ecaaf8e (diff)
downloadlibusb-04ff7aab6a01d4f47b9903ace4b2074809118e91.tar.gz
r109: workaround for broken timercmp on both windows and some posix systems (latter according to linux manpage, which says glibc does not have this problem)
-rw-r--r--libusb/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libusb/io.c b/libusb/io.c
index f08fe72..c94df17 100644
--- a/libusb/io.c
+++ b/libusb/io.c
@@ -2148,7 +2148,7 @@ API_EXPORTED int libusb_get_next_timeout(libusb_context *ctx,
}
TIMESPEC_TO_TIMEVAL(&cur_tv, &cur_ts);
- if (timercmp(&cur_tv, next_timeout, >=)) {
+ if (!timercmp(&cur_tv, next_timeout, <)) {
usbi_dbg("first timeout already expired");
timerclear(tv);
} else {