From acc9c097d33be51d097d4511ed532681d8d06df0 Mon Sep 17 00:00:00 2001 From: Francesco Cozzuto Date: Thu, 4 Dec 2025 22:21:31 +0100 Subject: [PATCH] Forward declare struct pollfd in ToastyFS.h to avoid including winsock2.h and poll.h --- inc/ToastyFS.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/inc/ToastyFS.h b/inc/ToastyFS.h index 92a0c5f..0df6557 100644 --- a/inc/ToastyFS.h +++ b/inc/ToastyFS.h @@ -7,13 +7,6 @@ #include #include -// Get the definition of "struct pollfd" -#ifdef _WIN32 -#include -#else -#include -#endif - ////////////////////////////////////////////////////////////////////////////////// // TYPES & UTILITIES ////////////////////////////////////////////////////////////////////////////////// @@ -258,6 +251,8 @@ void toasty_free_result(ToastyResult *result); #define TOASTY_POLL_CAPACITY 514 +struct pollfd; + // TODO: comment int toasty_process_events(ToastyFS *toasty, void **contexts, struct pollfd *polled, int num_polled);