Forward declare struct pollfd in ToastyFS.h to avoid including winsock2.h and poll.h

This commit is contained in:
2025-12-05 09:10:25 +01:00
parent 6746b0d5fb
commit acc9c097d3
+2 -7
View File
@@ -7,13 +7,6 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
// Get the definition of "struct pollfd"
#ifdef _WIN32
#include <winsock2.h>
#else
#include <poll.h>
#endif
////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////
// TYPES & UTILITIES // TYPES & UTILITIES
////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////
@@ -258,6 +251,8 @@ void toasty_free_result(ToastyResult *result);
#define TOASTY_POLL_CAPACITY 514 #define TOASTY_POLL_CAPACITY 514
struct pollfd;
// TODO: comment // TODO: comment
int toasty_process_events(ToastyFS *toasty, void **contexts, int toasty_process_events(ToastyFS *toasty, void **contexts,
struct pollfd *polled, int num_polled); struct pollfd *polled, int num_polled);