From c26581e29f1f8f23217da266b57082e81dfc8320 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Fri, 7 Dec 2012 15:49:21 +0100 Subject: [PATCH] Fix infinite loop in timeout handling on Windows. --- src/dropin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dropin.h b/src/dropin.h index 61143eb8..5279de79 100644 --- a/src/dropin.h +++ b/src/dropin.h @@ -58,7 +58,7 @@ extern int usleep(long long usec); #define timersub(a, b, r) do {\ (r)->tv_sec = (a)->tv_sec - (b)->tv_sec;\ (r)->tv_usec = (a)->tv_usec - (b)->tv_usec;\ - if((r)->tv_usec < 1000000)\ + if((r)->tv_usec < 0)\ (r)->tv_sec--, (r)->tv_usec += 1000000;\ } while (0) #endif -- 2.39.5