From 0aa5e49c6845ecd82531341085f367767c9f419a Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Wed, 5 Apr 2017 09:49:19 -0700 Subject: compiler: Add __designated_init annotation This allows structure annotations for requiring designated initialization in GCC 5.1.0 and later: https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html The structure randomization layout plugin will be using this to help identify structures that need this form of initialization. Signed-off-by: Kees Cook --- include/linux/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/linux/compiler.h') diff --git a/include/linux/compiler.h b/include/linux/compiler.h index f8110051188f..80a1dea36cbe 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -440,6 +440,10 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s # define __attribute_const__ /* unimplemented */ #endif +#ifndef __designated_init +# define __designated_init +#endif + #ifndef __latent_entropy # define __latent_entropy #endif -- cgit v1.2.3-59-g8ed1b