Skip to content

Commit

Permalink
compiler: fix __noreturn on bionic
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Sep 30, 2018
1 parent 52a11c3 commit 0b35ed8
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions src/lxc/compiler.h
Expand Up @@ -20,6 +20,8 @@
#ifndef __LXC_COMPILER_H
#define __LXC_COMPILER_H

#include <sys/cdefs.h>

#include "config.h"

#ifndef thread_local
Expand All @@ -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
Expand Down

0 comments on commit 0b35ed8

Please sign in to comment.