From aa27fde9d0eb5a84f3d21f5ea1a2fefee5dd8719 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 1 Jul 2025 16:28:13 -0300 Subject: [PATCH] fix unix detection in wrong place --- mongoose.c | 2 +- src/net.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 0d30694f..8b03c9ab 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4147,7 +4147,7 @@ void mg_mgr_init(struct mg_mgr *mgr) { // clang-format on #elif MG_ENABLE_FREERTOS_TCP mgr->ss = FreeRTOS_CreateSocketSet(); -#elif defined(__unix) || defined(__unix__) || defined(__APPLE__) +#elif MG_ARCH == MG_ARCH_UNIX // Ignore SIGPIPE signal, so if client cancels the request, it // won't kill the whole process. signal(SIGPIPE, SIG_IGN); diff --git a/src/net.c b/src/net.c index c46212ff..d73370fc 100644 --- a/src/net.c +++ b/src/net.c @@ -267,7 +267,7 @@ void mg_mgr_init(struct mg_mgr *mgr) { // clang-format on #elif MG_ENABLE_FREERTOS_TCP mgr->ss = FreeRTOS_CreateSocketSet(); -#elif defined(__unix) || defined(__unix__) || defined(__APPLE__) +#elif MG_ARCH == MG_ARCH_UNIX // Ignore SIGPIPE signal, so if client cancels the request, it // won't kill the whole process. signal(SIGPIPE, SIG_IGN);