From cbc31837caaf4d33412af1de5e7da888429e2bed Mon Sep 17 00:00:00 2001 From: Luc <8822552+luc-github@users.noreply.github.com> Date: Sat, 24 Aug 2024 16:13:51 +0800 Subject: [PATCH] Make backward compatible for the warning fix --- library.properties | 2 +- src/ESP32SSDP.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/library.properties b/library.properties index dc3e379..4cf7928 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=ESP32SSDP -version=2.0.1 +version=2.0.2 author=Me-No-Dev maintainer=luc-github sentence=Simple SSDP library for ESP32 diff --git a/src/ESP32SSDP.cpp b/src/ESP32SSDP.cpp index 6e52c47..0f3163b 100644 --- a/src/ESP32SSDP.cpp +++ b/src/ESP32SSDP.cpp @@ -67,7 +67,11 @@ static const char _ssdp_notify_template[] PROGMEM = static const char _ssdp_packet_template[] PROGMEM = "%s" // _ssdp_response_template / _ssdp_notify_template +#if (ESP_ARDUINO_VERSION_MAJOR < 3) "CACHE-CONTROL: max-age=%u\r\n" // _interval +#else + "CACHE-CONTROL: max-age=%lu\r\n" // _interval +#endif //(ESP_ARDUINO_VERSION_MAJOR < 3) "SERVER: %s UPNP/1.1 %s/%s\r\n" // _servername, _modelName, _modelNumber "USN: uuid:%s%s\r\n" // _uuid, _usn_suffix "%s: %s\r\n" // "NT" or "ST", _deviceType