From 2cebfc9c1082a76a6abfa488c8494e9b903f0e5f Mon Sep 17 00:00:00 2001 From: kettenis <> Date: Fri, 6 Jan 2017 14:36:50 +0000 Subject: [PATCH] Add max_align_t. ok millert@ --- src/include/stddef.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/include/stddef.h b/src/include/stddef.h index 88bd55f1..391fbc23 100644 --- a/src/include/stddef.h +++ b/src/include/stddef.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stddef.h,v 1.13 2016/09/09 18:12:37 millert Exp $ */ +/* $OpenBSD: stddef.h,v 1.14 2017/01/06 14:36:50 kettenis Exp $ */ /* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */ /*- @@ -71,4 +71,14 @@ typedef __mbstate_t mbstate_t; #define offsetof(type, member) ((size_t)(&((type *)0)->member)) #endif +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103 +#ifndef __CLANG_MAX_ALIGN_T_DEFINED +#define __CLANG_MAX_ALIGN_T_DEFINED +typedef struct { + long long __max_align_ll __aligned(__alignof__(long long)); + long double __max_align_ld __aligned(__alignof__(long double)); +} max_align_t; +#endif +#endif + #endif /* _STDDEF_H_ */