scst/include/backport.h: Backport the fallthrough macro (merge r9147 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@9202 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-12-03 03:34:45 +00:00
parent ae7eb0c978
commit 7caab58196
+9
View File
@@ -212,6 +212,15 @@ static inline void *bsg_job_sense(struct bsg_job *job)
#endif
/* <linux/compiler_attributes.h> */
/* See also commit 294f69e662d1 ("compiler_attributes.h: Add 'fallthrough'
* pseudo keyword for switch/case use") # v5.4
*/
#ifndef fallthrough
#define fallthrough __attribute__((__fallthrough__))
#endif
/* <linux/cpumask.h> */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) && !defined(BACKPORT_LINUX_CPUMASK_H)