MSVC: use winsock2.h instead of sys/time.h for struct timeval

This commit is contained in:
August2111 2021-02-22 16:50:37 +01:00 committed by Max Kellermann
parent 31c7151580
commit 3c3c3eeeca
1 changed files with 6 additions and 1 deletions

View File

@ -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)