From e9d7606869bd17f22bb7430481a661bab41194a2 Mon Sep 17 00:00:00 2001 From: Kartik Naik Date: Fri, 21 Aug 2026 12:09:04 +0530 Subject: use winsock's struct timeval in the msvc sys/time.h shim --- include/compat/sys/time.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include/compat') diff --git a/include/compat/sys/time.h b/include/compat/sys/time.h index 2448969..0388333 100644 --- a/include/compat/sys/time.h +++ b/include/compat/sys/time.h @@ -7,16 +7,15 @@ #define LIBCRYPTOCOMPAT_SYS_TIME_H #ifdef _MSC_VER +/* + * Use the winsock struct timeval: it is what gives + * callers of DTLSv1_get_timeout() and the dgram BIO ctrls, so libssl + * must be built against the same layout. + */ #include -#define timeval libressl_timeval #define gettimeofday libressl_gettimeofday -struct timeval { - long long tv_sec; - long tv_usec; -}; - int gettimeofday(struct timeval *tp, void *tzp); #else #include_next -- cgit v1.2.3-55-g6feb