From: Christian Brauner Date: Thu, 18 Feb 2021 13:42:39 +0000 (+0100) Subject: compiler: fix fallthrough attribute X-Git-Tag: lxc-5.0.0~278^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd1cf1b1ab013d25f3f1e53ac53ed7b378efaf35;p=thirdparty%2Flxc.git compiler: fix fallthrough attribute Signed-off-by: Christian Brauner --- diff --git a/src/lxc/compiler.h b/src/lxc/compiler.h index c230e510c..755c21d52 100644 --- a/src/lxc/compiler.h +++ b/src/lxc/compiler.h @@ -19,7 +19,9 @@ #endif #endif -#ifndef __fallthrough +#if __GNUC__ >= 7 +#define __fallthrough __attribute__((__fallthrough__)) +#else #define __fallthrough /* fall through */ #endif