From 724a9b76e1a4f7b60fb307838364471cc4eca6e8 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 3 Dec 2020 03:39:22 +0000 Subject: [PATCH] scst: Restore compatibility with gcc 4.x (RHEL 7.x) (merge r9161 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@9204 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 4493f5e0f..ebc5ce719 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -218,7 +218,15 @@ static inline void *bsg_job_sense(struct bsg_job *job) * 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 /* */