compiler: fix __noreturn on bionic

parent 52a11c3c
...@@ -20,6 +20,8 @@ ...@@ -20,6 +20,8 @@
#ifndef __LXC_COMPILER_H #ifndef __LXC_COMPILER_H
#define __LXC_COMPILER_H #define __LXC_COMPILER_H
#include <sys/cdefs.h>
#include "config.h" #include "config.h"
#ifndef thread_local #ifndef thread_local
...@@ -38,12 +40,18 @@ ...@@ -38,12 +40,18 @@
#define __fallthrough #define __fallthrough
#endif #endif
#ifndef _noreturn_ #ifndef __noreturn
#if __STDC_VERSION__ >= 201112L && !IS_BIONIC # if __STDC_VERSION__ >= 201112L
#define __noreturn _Noreturn # if !IS_BIONIC
#else # define __noreturn _Noreturn
#define __noreturn __attribute__((noreturn)) # else
#endif # define __noreturn __attribute__((__noreturn__))
# endif
# elif IS_BIONIC
# define __noreturn __attribute__((__noreturn__))
# else
# define __noreturn __attribute__((noreturn))
# endif
#endif #endif
#define __cgfsng_ops #define __cgfsng_ops
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment