diff --git a/include/kerncompat.h b/include/kerncompat.h index 31cd9d8d..eb98afbb 100644 --- a/include/kerncompat.h +++ b/include/kerncompat.h @@ -305,6 +305,9 @@ static inline void up_read(struct rw_semaphore *sem) #if defined __has_attribute # if __has_attribute(__fallthrough__) # define fallthrough __attribute__((__fallthrough__)) +# else +/* Compatibility with gcc 5.x and 6.x that don't have the attribute. */ +# define fallthrough do {} while (0) /* fallthrough */ # endif #else # define fallthrough do {} while (0) /* fallthrough */