Whamcloud - gitweb
LU-15492 build: fallthrough macro for pre/post gcc-7
[fs/lustre-release.git] / lustre / utils / gss / gss_util.h
index a251fca..07b0f30 100644 (file)
 #include "write_bytes.h"
 
 #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
 
 extern char *this_realm;