Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-15492 build: fallthrough macro for pre/post gcc-7
[fs/lustre-release.git]
/
lustre
/
include
/
lustre_compat.h
diff --git
a/lustre/include/lustre_compat.h
b/lustre/include/lustre_compat.h
index
ccd0960
..
6338b52
100644
(file)
--- a/
lustre/include/lustre_compat.h
+++ b/
lustre/include/lustre_compat.h
@@
-600,7
+600,11
@@
static inline bool is_root_inode(struct inode *inode)
#endif
#ifndef fallthrough
#endif
#ifndef fallthrough
-#define fallthrough do {} while (0) /* fallthrough */
+# if defined(__GNUC__) && __GNUC__ >= 7
+# define fallthrough __attribute__((fallthrough)) /* fallthrough */
+# else
+# define fallthrough do {} while (0) /* fallthrough */
+# endif
#endif
static inline void ll_security_release_secctx(char *secdata, u32 seclen)
#endif
static inline void ll_security_release_secctx(char *secdata, u32 seclen)