From 64383fb5b55a74b706967836e81cef61e57df86a Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 1 Jun 2010 11:38:14 +0100 Subject: [PATCH] fixes the possibility of using a broken timercmp on Windows Microsoft's implementation of timercmp does not work for >= or <=. --- libusb/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libusb/io.c b/libusb/io.c index b38a7c7..05f1614 100644 --- a/libusb/io.c +++ b/libusb/io.c @@ -2155,7 +2155,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 { -- 2.7.4