From 0798b149abb9dad88d5c1522f3a7d1198e3f68aa Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sun, 15 Feb 2026 03:54:35 +0300 Subject: [PATCH] Fix Windows build: use WSAPoll instead of poll for linking --- lib/platform_compat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/platform_compat.h b/lib/platform_compat.h index 9d53bcb..0f3274b 100644 --- a/lib/platform_compat.h +++ b/lib/platform_compat.h @@ -103,8 +103,8 @@ // nanosleep already defined in pthread_time.h on MSYS2 // poll() and pollfd already defined in winsock2.h on MSYS2 - // Explicitly declare poll() to avoid implicit declaration warning - int poll(struct pollfd *fds, unsigned long nfds, int timeout); + // Use WSAPoll on Windows (available in Vista and later) + #define poll WSAPoll // sa_family_t might not be defined on some Windows setups #ifndef sa_family_t