From 86170d0829a56b3be44aa08e8999aa6a7838dd65 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 3 Dec 2020 03:40:11 +0000 Subject: [PATCH] scst: Make scst/include/backport.h again compatible with MOFED (merge r9163 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@9205 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index ebc5ce719..e9df7bce0 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -218,13 +218,14 @@ static inline void *bsg_job_sense(struct bsg_job *job) * pseudo keyword for switch/case use") # v5.4 */ #ifndef fallthrough -#ifdef __has_attribute +#if __GNUC__ >= 5 #if __has_attribute(__fallthrough__) #define fallthrough __attribute__((__fallthrough__)) #else #define fallthrough do {} while (0) /* fallthrough */ #endif #else +/* gcc 4.x doesn't support __has_attribute() */ #define fallthrough do {} while (0) /* fallthrough */ #endif #endif