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