On OS/2 kLIBC, `max_align_t' is defined only in C++ mode. * lib/stddef.in.h [OS/2 kLIBC]: Include <cstddef> in C++ mode. --- lib/stddef.in.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 77147e9bc..c415cbb85 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -104,7 +104,8 @@ typedef long max_align_t; On MSVC, max_align_t is defined only in C++ mode, after <cstddef> was included. Its definition is good since it has an alignment of 8 (on x86 and x86_64). */ -#if defined _MSC_VER && defined __cplusplus +#if (defined _MSC_VER || (defined __KLIBC__ && !defined __LIBCN__)) \ + && defined __cplusplus # include <cstddef> #else # if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) -- 2.22.0