From 6de419d14c343ea9162a3536e06e0146e30ba7cf Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Fri, 2 Jan 2026 14:22:55 -0300 Subject: [PATCH] fix lwIP redefinition of nfds_t --- mongoose.h | 5 ++++- src/arch_win32.h | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mongoose.h b/mongoose.h index 2802b4c3..7a4ab67d 100644 --- a/mongoose.h +++ b/mongoose.h @@ -651,7 +651,10 @@ typedef enum { false = 0, true = 1 } bool; #endif #endif -typedef unsigned long nfds_t; +#if defined(MG_ENABLE_POLL) && MG_ENABLE_POLL && (!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP) +typedef unsigned long nfds_t; // see #3388 +#endif + #if defined(_MSC_VER) #if MG_ENABLE_WINSOCK #pragma comment(lib, "ws2_32.lib") diff --git a/src/arch_win32.h b/src/arch_win32.h index ebaeca76..90ba7cad 100644 --- a/src/arch_win32.h +++ b/src/arch_win32.h @@ -110,7 +110,10 @@ typedef enum { false = 0, true = 1 } bool; #endif #endif -typedef unsigned long nfds_t; +#if defined(MG_ENABLE_POLL) && MG_ENABLE_POLL && (!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP) +typedef unsigned long nfds_t; // see #3388 +#endif + #if defined(_MSC_VER) #if MG_ENABLE_WINSOCK #pragma comment(lib, "ws2_32.lib")