Allow using PROGMEM outside of Arduino (fixes #1903)

Ported from 40daf56b5a
This commit is contained in:
Benoit Blanchon
2023-04-07 18:19:33 +02:00
parent dd46813dc0
commit 461cdaa818
12 changed files with 22 additions and 19 deletions

View File

@ -13,7 +13,8 @@
// Include Arduino.h before stdlib.h to avoid conflict with atexit()
// https://github.com/bblanchon/ArduinoJson/pull/1693#issuecomment-1001060240
#if ARDUINOJSON_ENABLE_ARDUINO_STRING || ARDUINOJSON_ENABLE_ARDUINO_STREAM || \
ARDUINOJSON_ENABLE_ARDUINO_PRINT || ARDUINOJSON_ENABLE_PROGMEM
ARDUINOJSON_ENABLE_ARDUINO_PRINT || \
(ARDUINOJSON_ENABLE_PROGMEM && defined(ARDUINO))
# include <Arduino.h>
#endif