]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
compiler: fix __noreturn on bionic 2647/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 26 Sep 2018 12:38:41 +0000 (14:38 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 26 Sep 2018 12:38:41 +0000 (14:38 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/compiler.h

index 76a7b733d008615a0a73f573a73c2c7811bc9bac..59ad802dabaa788f364d97a5cbc0a89a3f33ba8e 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef __LXC_COMPILER_H
 #define __LXC_COMPILER_H
 
+#include <sys/cdefs.h>
+
 #include "config.h"
 
 #ifndef thread_local
 #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