diff --git a/src/knx/group_object.h b/src/knx/group_object.h index 0e71b96..3578c39 100644 --- a/src/knx/group_object.h +++ b/src/knx/group_object.h @@ -19,7 +19,15 @@ enum ComFlag class GroupObject; -#ifdef __linux__ +#ifndef HAS_FUNCTIONAL +# if defined(__linux__) || defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_STM32) +# define HAS_FUNCTIONAL 1 +# else +# define HAS_FUNCTIONAL 0 +# endif +#endif + +#if HAS_FUNCTIONAL #include typedef std::function GroupObjectUpdatedHandler; #else