From e66437b56089be46886084ff3930f352b6d3d909 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 16 Nov 2021 23:22:51 +0000 Subject: [PATCH] fix compilation under mingw64 (#325) --- ixwebsocket/IXNetSystem.cpp | 2 ++ ixwebsocket/IXNetSystem.h | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ixwebsocket/IXNetSystem.cpp b/ixwebsocket/IXNetSystem.cpp index 38008b54..ab7b2a38 100644 --- a/ixwebsocket/IXNetSystem.cpp +++ b/ixwebsocket/IXNetSystem.cpp @@ -5,6 +5,8 @@ */ #include "IXNetSystem.h" +#include +#include namespace ix { diff --git a/ixwebsocket/IXNetSystem.h b/ixwebsocket/IXNetSystem.h index f919d8db..b2220a95 100644 --- a/ixwebsocket/IXNetSystem.h +++ b/ixwebsocket/IXNetSystem.h @@ -34,8 +34,8 @@ // Define our own poll on Windows, as a wrapper on top of select typedef unsigned long int nfds_t; -// mingw does not know about poll so mock it -#if defined(__GNUC__) +// pollfd is not defined by some versions of mingw64 since _WIN32_WINNT is too low +#if _WIN32_WINNT < 0x0600 struct pollfd { int fd; /* file descriptor */