aboutsummaryrefslogtreecommitdiff
path: root/include/compat/sys
diff options
context:
space:
mode:
authorKartik Naik <kartik@bugqore.com>2026-08-21 12:09:04 +0530
committerKartik Naik <kartik@bugqore.com>2026-08-21 12:09:04 +0530
commite9d7606869bd17f22bb7430481a661bab41194a2 (patch)
tree34b0d845718bf2cf987aa2944ad4232c07161905 /include/compat/sys
parent18d6ee9f4eec5a8b5e31eeaa5412d191c1afb742 (diff)
downloadportable-e9d7606869bd17f22bb7430481a661bab41194a2.tar.gz
portable-e9d7606869bd17f22bb7430481a661bab41194a2.tar.bz2
portable-e9d7606869bd17f22bb7430481a661bab41194a2.zip
use winsock's struct timeval in the msvc sys/time.h shim
Diffstat (limited to 'include/compat/sys')
-rw-r--r--include/compat/sys/time.h11
1 files changed, 5 insertions, 6 deletions
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 @@
7#define LIBCRYPTOCOMPAT_SYS_TIME_H 7#define LIBCRYPTOCOMPAT_SYS_TIME_H
8 8
9#ifdef _MSC_VER 9#ifdef _MSC_VER
10/*
11 * Use the winsock struct timeval: it is what <openssl/dtls1.h> gives
12 * callers of DTLSv1_get_timeout() and the dgram BIO ctrls, so libssl
13 * must be built against the same layout.
14 */
10#include <winsock2.h> 15#include <winsock2.h>
11 16
12#define timeval libressl_timeval
13#define gettimeofday libressl_gettimeofday 17#define gettimeofday libressl_gettimeofday
14 18
15struct timeval {
16 long long tv_sec;
17 long tv_usec;
18};
19
20int gettimeofday(struct timeval *tp, void *tzp); 19int gettimeofday(struct timeval *tp, void *tzp);
21#else 20#else
22#include_next <sys/time.h> 21#include_next <sys/time.h>