From 28b9319379efad9f7073b8016a0df7b393294557 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Fri, 4 Dec 2020 22:05:28 +0000 Subject: [PATCH] older compiler than gcc 5 does not have __has_attribute --- sound-compatible-4.18.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound-compatible-4.18.h b/sound-compatible-4.18.h index faed848..c9fe0f6 100644 --- a/sound-compatible-4.18.h +++ b/sound-compatible-4.18.h @@ -16,7 +16,7 @@ #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(5,4,0) -#if __has_attribute(__fallthrough__) +#if defined(__has_attribute) && __has_attribute(__fallthrough__) # define fallthrough __attribute__((__fallthrough__)) #else # define fallthrough do {} while (0) /* fallthrough */