From 7357622d806833d93d317164dc6673fbf5fd1629 Mon Sep 17 00:00:00 2001 From: Markus Gothe <markus.gothe@genexis.eu> Date: Sun, 23 Feb 2025 03:37:00 +0100 Subject: [PATCH] Fix fallthrough attribute for older kernels. --- src/ebt_igmpsnooping.c | 8 ++++++++ src/ebt_mldsnooping.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/ebt_igmpsnooping.c b/src/ebt_igmpsnooping.c index fb5f480..af76adf 100644 --- a/src/ebt_igmpsnooping.c +++ b/src/ebt_igmpsnooping.c @@ -29,6 +29,14 @@ #include <linux/netfilter_bridge/ebt_igmpsnooping.h> #include <net/netfilter/br_netfilter.h> +#ifndef fallthrough +#if __has_attribute(__fallthrough__) +# define fallthrough __attribute__((__fallthrough__)) +#else +# define fallthrough do {} while (0) /* fallthrough */ +#endif +#endif + static DEFINE_SPINLOCK(igmp_lock); static int igmp_snooping_show(struct seq_file *seq, void *v) diff --git a/src/ebt_mldsnooping.c b/src/ebt_mldsnooping.c index a2c48b6..9e3ff2e 100644 --- a/src/ebt_mldsnooping.c +++ b/src/ebt_mldsnooping.c @@ -31,6 +31,14 @@ #include <linux/netfilter_bridge/ebt_mldsnooping.h> #include <net/netfilter/br_netfilter.h> +#ifndef fallthrough +#if __has_attribute(__fallthrough__) +# define fallthrough __attribute__((__fallthrough__)) +#else +# define fallthrough do {} while (0) /* fallthrough */ +#endif +#endif + static DEFINE_SPINLOCK(mld_lock); static int mld_snooping_show(struct seq_file *seq, void *v) -- GitLab