]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - testsuite/testsuite.h
Use C11's noreturn
[thirdparty/kmod.git] / testsuite / testsuite.h
index e4f3ecfac8492ac1558be8495fa4288a6104d38b..97183cdedea81e0f37771caff0770ac364dbabc1 100644 (file)
@@ -21,6 +21,8 @@
 #include <stdbool.h>
 #include <stdarg.h>
 
+#include "macro.h"
+
 struct test;
 typedef int (*testfunc)(const struct test *t);
 
@@ -152,4 +154,10 @@ int test_run(const struct test *t);
                exit(EXIT_SUCCESS);                             \
        }                                                       \
 
-#define __noreturn __attribute__((noreturn))
+#ifdef noreturn
+# define __noreturn noreturn
+#elif __STDC_VERSION__ >= 201112L
+# define __noreturn _Noreturn
+#else
+# define __noreturn __attribute__((noreturn))
+#endif