diff --git a/version_helper.h b/version_helper.h index ab7bb0ca..cfc99cf3 100644 --- a/version_helper.h +++ b/version_helper.h @@ -157,6 +157,16 @@ e-mail : support@circuitsathome.com #define fprintf_P(s, ...) ((s), __VA_ARGS__) #endif +#ifdef ESP8266 +// Workaround the following issue: https://github.com/esp8266/Arduino/pull/5735 +#undef pgm_read_ptr_aligned +#ifdef __cplusplus +#define pgm_read_ptr_aligned(addr) (*reinterpret_cast(addr)) +#else +#define pgm_read_ptr_aligned(addr) (*(const void* const*)(addr)) +#endif +#endif + #ifndef pgm_read_byte #define pgm_read_byte(addr) (*(const unsigned char *)(addr)) #endif