[PATCH i-g-t v6 10/14] lib/igt_core: Conditionally define __noreturn for non-Android platforms

Jeevaka Prabu Badrappan jeevaka.badrappan at intel.com
Fri May 16 16:05:47 UTC 2025


Ensure __noreturn is defined only if it is not already defined,
addressing compatibility with Android where __noreturn is predefined.

Signed-off-by: Jeevaka Prabu Badrappan <jeevaka.badrappan at intel.com>
Acked-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 lib/igt_core.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/igt_core.h b/lib/igt_core.h
index 45170e215..2db579423 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -86,7 +86,9 @@
 #define igt_assume(e) BUILD_BUG_ON_INVALID(e)
 #endif
 
+#ifndef __noreturn
 #define __noreturn __attribute__((noreturn))
+#endif
 #define __maybe_unused __attribute__((unused))
 
 extern const char* __igt_test_description __attribute__((weak));
-- 
2.49.0



More information about the igt-dev mailing list