diff --git a/repos/base/include/util/reconstructible.h b/repos/base/include/util/reconstructible.h index 5385749f70..036f430c5f 100644 --- a/repos/base/include/util/reconstructible.h +++ b/repos/base/include/util/reconstructible.h @@ -15,6 +15,7 @@ #define _INCLUDE__UTIL__RECONSTRUCTIBLE_H_ #include +#include #include #include @@ -36,14 +37,15 @@ namespace Genode { * \param MT type */ template -class Genode::Reconstructible : Noncopyable +class alignas(Genode::max(alignof(MT), sizeof(Genode::addr_t))) +Genode::Reconstructible : Noncopyable { private: /** * Static reservation of memory for the embedded object */ - char _space[sizeof(MT)] __attribute__((aligned(sizeof(addr_t)))); + char _space[sizeof(MT)] alignas(sizeof(addr_t)); /** * True if the volatile object contains a constructed object