From: Christian Brauner Date: Wed, 26 Sep 2018 12:38:41 +0000 (+0200) Subject: compiler: fix __noreturn on bionic X-Git-Tag: lxc-3.1.0~86^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2647%2Fhead;p=thirdparty%2Flxc.git compiler: fix __noreturn on bionic Signed-off-by: Christian Brauner --- diff --git a/src/lxc/compiler.h b/src/lxc/compiler.h index 76a7b733d..59ad802da 100644 --- a/src/lxc/compiler.h +++ b/src/lxc/compiler.h @@ -20,6 +20,8 @@ #ifndef __LXC_COMPILER_H #define __LXC_COMPILER_H +#include + #include "config.h" #ifndef thread_local @@ -38,12 +40,18 @@ #define __fallthrough #endif -#ifndef _noreturn_ -#if __STDC_VERSION__ >= 201112L && !IS_BIONIC -#define __noreturn _Noreturn -#else -#define __noreturn __attribute__((noreturn)) -#endif +#ifndef __noreturn +# if __STDC_VERSION__ >= 201112L +# if !IS_BIONIC +# define __noreturn _Noreturn +# else +# define __noreturn __attribute__((__noreturn__)) +# endif +# elif IS_BIONIC +# define __noreturn __attribute__((__noreturn__)) +# else +# define __noreturn __attribute__((noreturn)) +# endif #endif #define __cgfsng_ops