diff options
Diffstat (limited to 'tools/include/linux/compiler.h')
-rw-r--r-- | tools/include/linux/compiler.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/include/linux/compiler.h b/tools/include/linux/compiler.h index 88461f09cc86..8717c80f759c 100644 --- a/tools/include/linux/compiler.h +++ b/tools/include/linux/compiler.h @@ -37,4 +37,12 @@ #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) +#ifndef __fallthrough +# if defined(__GNUC__) && __GNUC__ >= 7 +# define __fallthrough __attribute__ ((fallthrough)) +# else +# define __fallthrough +# endif +#endif + #endif /* _TOOLS_LINUX_COMPILER_H */ |