From: Chung-Chiang Cheng Date: Mon, 28 Mar 2022 06:47:25 +0000 (+0800) Subject: Fix compile error of GCC 4 X-Git-Tag: fio-3.30~4^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=31e65735b99dcc7288fe2ede9dc647f53fe8d6b2;p=fio.git Fix compile error of GCC 4 gcc-4.9.3 doesn't recognize __has_attribute(__fallthrough__) and reports the following error. CC crc/crc32c-arm64.o In file included from crc/../os/../file.h:5:0, from crc/../os/os-linux.h:32, from crc/../os/os.h:39, from crc/crc32c-arm64.c:2: crc/../os/../compiler/compiler.h:74:20: error: missing binary operator before token "(" Makefile:501: recipe for target 'crc/crc32c-arm64.o' failed make: *** [crc/crc32c-arm64.o] Error 1 Signed-off-by: Chung-Chiang Cheng --- diff --git a/compiler/compiler.h b/compiler/compiler.h index 44fa87b9..3fd0822f 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -67,6 +67,7 @@ #endif #ifndef __has_attribute +#define __has_attribute(x) __GCC4_has_attribute_##x #define __GCC4_has_attribute___fallthrough__ 0 #endif