From e0bd33910fea280fa8c2ef9c3d2f272ff3aeb8c7 Mon Sep 17 00:00:00 2001 From: Guido Flohr Date: Thu, 13 Jul 2023 18:14:45 +0300 Subject: [PATCH] Use WSAPoll() instead of poll() on Win32 --- examples/eventloop/c_eventloop.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/eventloop/c_eventloop.c b/examples/eventloop/c_eventloop.c index 24cebbb29f..83444df151 100644 --- a/examples/eventloop/c_eventloop.c +++ b/examples/eventloop/c_eventloop.c @@ -11,7 +11,14 @@ #include #include #include + +#if defined(_WIN32) +#include +#define poll WSAPoll +#pragma comment(lib, "ws2_32") +#else #include +#endif #include "duktape.h" #include "c_eventloop.h"