From 83ac5a206f763c9295e11ca03b0d087de281d708 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 1 Jul 2025 11:36:36 -0500 Subject: [PATCH 1/2] Fix compile on libretiny due to round macro conflict --- src/AsyncEventSource.h | 3 +++ src/AsyncWebSocket.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/AsyncEventSource.h b/src/AsyncEventSource.h index 49f65e85..3dde859d 100644 --- a/src/AsyncEventSource.h +++ b/src/AsyncEventSource.h @@ -8,6 +8,9 @@ #if defined(ESP32) || defined(LIBRETINY) #include +#ifdef round +#undef round +#endif #include #ifndef SSE_MAX_QUEUED_MESSAGES #define SSE_MAX_QUEUED_MESSAGES 32 diff --git a/src/AsyncWebSocket.h b/src/AsyncWebSocket.h index 979c8be7..02af83dc 100644 --- a/src/AsyncWebSocket.h +++ b/src/AsyncWebSocket.h @@ -8,6 +8,9 @@ #if defined(ESP32) || defined(LIBRETINY) #include +#ifdef round +#undef round +#endif #include #ifndef WS_MAX_QUEUED_MESSAGES #define WS_MAX_QUEUED_MESSAGES 32 From c9b70bd8d9778509e355636cff4c49687049ee7a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 1 Jul 2025 11:44:03 -0500 Subject: [PATCH 2/2] LIBRETINY check inside the ifdef --- src/AsyncEventSource.h | 2 ++ src/AsyncWebSocket.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/AsyncEventSource.h b/src/AsyncEventSource.h index 3dde859d..ccfda95e 100644 --- a/src/AsyncEventSource.h +++ b/src/AsyncEventSource.h @@ -8,9 +8,11 @@ #if defined(ESP32) || defined(LIBRETINY) #include +#ifdef LIBRETINY #ifdef round #undef round #endif +#endif #include #ifndef SSE_MAX_QUEUED_MESSAGES #define SSE_MAX_QUEUED_MESSAGES 32 diff --git a/src/AsyncWebSocket.h b/src/AsyncWebSocket.h index 02af83dc..f93b0387 100644 --- a/src/AsyncWebSocket.h +++ b/src/AsyncWebSocket.h @@ -8,9 +8,11 @@ #if defined(ESP32) || defined(LIBRETINY) #include +#ifdef LIBRETINY #ifdef round #undef round #endif +#endif #include #ifndef WS_MAX_QUEUED_MESSAGES #define WS_MAX_QUEUED_MESSAGES 32