From 1b74826f155406f86846d5c97b3534aab87cf6da Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 26 Dec 2021 15:21:39 +0100 Subject: [PATCH] src/optparse.c: fix build without __has_attribute Fix build failure without __has_attribute (e.g. gcc 4.8) which is raised since https://github.com/merbanan/rtl_433/commit/6c8af75c757712bd58b169317795484a72e9a16c Signed-off-by: Fabrice Fontaine [Upstream status: https://github.com/merbanan/rtl_433/pull/1918] --- src/optparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/optparse.c b/src/optparse.c index aa3d0b53..b5e2d37e 100644 --- a/src/optparse.c +++ b/src/optparse.c @@ -232,9 +232,11 @@ int atoi_time(char const *str, char const *error_hint) } // intentional fallthrough #if defined(__GNUC__) || defined(__clang__) +#if defined __has_attribute #if __has_attribute(fallthrough) __attribute__((fallthrough)); #endif +#endif #endif case ':': ++colons; -- 2.33.0