Include Arduino.h before stdlib.h to avoid conflict (closes #1693)

This commit is contained in:
Benoit Blanchon
2021-12-26 18:42:54 +01:00
parent ec7ffa20f2
commit c2800ace32

View File

@ -6,6 +6,13 @@
#include "ArduinoJson/Configuration.hpp" #include "ArduinoJson/Configuration.hpp"
// 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
# include <Arduino.h>
#endif
#if !ARDUINOJSON_DEBUG #if !ARDUINOJSON_DEBUG
# ifdef __clang__ # ifdef __clang__
# pragma clang system_header # pragma clang system_header