--- zzzz-none-000/linux-4.9.276/include/linux/compiler.h 2021-07-20 14:21:16.000000000 +0000 +++ falcon-5530-750/linux-4.9.276/include/linux/compiler.h 2023-04-05 08:19:02.000000000 +0000 @@ -367,6 +367,16 @@ # define __deprecated /* unimplemented */ #endif +/* + * The nonstring variable attribute specifies that an object or member + * declaration with type array of char, signed char, or unsigned char, + * or pointer to such a type is intended to store character arrays that + * do not necessarily contain a terminating NUL. + */ +#ifndef __nonstring +#define __nonstring +#endif + #ifdef MODULE #define __deprecated_for_modules __deprecated #else @@ -524,7 +534,8 @@ # define __compiletime_error_fallback(condition) do { } while (0) #endif -#define __compiletime_assert(condition, msg, prefix, suffix) \ +#ifdef __OPTIMIZE__ +# define __compiletime_assert(condition, msg, prefix, suffix) \ do { \ bool __cond = !(condition); \ extern void prefix ## suffix(void) __compiletime_error(msg); \ @@ -532,6 +543,9 @@ prefix ## suffix(); \ __compiletime_error_fallback(__cond); \ } while (0) +#else +# define __compiletime_assert(condition, msg, prefix, suffix) do { } while (0) +#endif #define _compiletime_assert(condition, msg, prefix, suffix) \ __compiletime_assert(condition, msg, prefix, suffix) @@ -606,6 +620,24 @@ # define nokprobe_inline inline #endif +#ifndef __diag +#define __diag(string) +#endif + +#ifndef __diag_GCC +#define __diag_GCC(version, severity, string) +#endif + +#define __diag_push() __diag(push) +#define __diag_pop() __diag(pop) + +#define __diag_ignore(compiler, version, option, comment) \ + __diag_##compiler(version, ignore, option) +#define __diag_warn(compiler, version, option, comment) \ + __diag_##compiler(version, warn, option) +#define __diag_error(compiler, version, option, comment) \ + __diag_##compiler(version, error, option) + /* * This is needed in functions which generate the stack canary, see * arch/x86/kernel/smpboot.c::start_secondary() for an example.