Fix a build error with MSVC

Also fixes a minor bug on Windows with timers running over ~49 days.

Signed-off-by: Gilles Peskine <[email protected]>
This commit is contained in:
Gilles Peskine
2026-02-19 16:53:52 +01:00
parent 7ea318246c
commit 5890b22b82
5 changed files with 16 additions and 6 deletions
+3 -1
View File
@@ -360,7 +360,9 @@ static unsigned elapsed_time(void)
return 0;
}
return mbedtls_timing_get_timer(&hires, 0);
/* Wraps after ~49.7 days (assuming 32-bit int).
* Don't run udp_proxy that long! */
return (unsigned) mbedtls_timing_get_timer(&hires, 0);
}
typedef struct {