From 8cdb9e6b30a5f9cad924e20febb8a560b232802e Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Mon, 7 Dec 2020 15:35:56 +0100 Subject: Move compiler specific compatibility support to separated file Kernel compatibility support was broken in 7.9, reported by Ed W. Signed-off-by: Jozsef Kadlecsik --- kernel/include/linux/netfilter/ipset/ip_set_compiler.h.in | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 kernel/include/linux/netfilter/ipset/ip_set_compiler.h.in (limited to 'kernel/include/linux/netfilter/ipset/ip_set_compiler.h.in') diff --git a/kernel/include/linux/netfilter/ipset/ip_set_compiler.h.in b/kernel/include/linux/netfilter/ipset/ip_set_compiler.h.in new file mode 100644 index 0000000..1b392f8 --- /dev/null +++ b/kernel/include/linux/netfilter/ipset/ip_set_compiler.h.in @@ -0,0 +1,15 @@ +#ifndef __IP_SET_COMPILER_H +#define __IP_SET_COMPILER_H + +/* Compiler attributes */ +#ifndef __has_attribute +# define __has_attribute(x) __GCC4_has_attribute_##x +# define __GCC4_has_attribute___fallthrough__ 0 +#endif + +#if __has_attribute(__fallthrough__) +# define fallthrough __attribute__((__fallthrough__)) +#else +# define fallthrough do {} while (0) /* fallthrough */ +#endif +#endif /* __IP_SET_COMPILER_H */ -- cgit v1.2.3