--- zzzz-none-000/linux-4.9.218/include/linux/compiler.h 2020-04-02 15:20:41.000000000 +0000 +++ seale-7590ac-750/linux-4.9.218/include/linux/compiler.h 2022-11-30 09:46:20.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) @@ -605,4 +619,23 @@ # define __kprobes # 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) + #endif /* __LINUX_COMPILER_H */