From 9d9ae0f153294e0d23f9216ac093b97f2875eb75 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 15 Sep 2020 03:44:03 +0000 Subject: [PATCH] scst: Restore compatibility with gcc 4.x (RHEL 7.x) git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9161 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scst/include/backport.h b/scst/include/backport.h index 0358636d4..8ffa83254 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -246,7 +246,15 @@ static inline void cpu_to_be32_array(__be32 *dst, const u32 *src, size_t len) * pseudo keyword for switch/case use") # v5.4 */ #ifndef fallthrough +#ifdef __has_attribute +#if __has_attribute(__fallthrough__) #define fallthrough __attribute__((__fallthrough__)) +#else +#define fallthrough do {} while (0) /* fallthrough */ +#endif +#else +#define fallthrough do {} while (0) /* fallthrough */ +#endif #endif /* */