From 3c3c3eeeca803293963347a2bde9e201ae04059e Mon Sep 17 00:00:00 2001 From: August2111 <Info@FlapsOnline.de> Date: Mon, 22 Feb 2021 16:50:37 +0100 Subject: [PATCH] MSVC: use winsock2.h instead of sys/time.h for struct timeval --- src/time/Convert.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/time/Convert.cxx b/src/time/Convert.cxx index 53e5abaf8..5e7ac51d2 100644 --- a/src/time/Convert.cxx +++ b/src/time/Convert.cxx @@ -35,7 +35,12 @@ #include <stdexcept> #include <time.h> -#include <sys/time.h> /* for struct timeval */ + +#ifdef _WIN32 +#include <winsock.h> /* for struct timeval */ +#else +#include <sys/time.h> /* for struct timeval */ +#endif struct tm GmTime(std::chrono::system_clock::time_point tp)