aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/lua/llimits.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/lua/llimits.h b/module/lua/llimits.h
index 7d9e13797..eee8f0c2d 100644
--- a/module/lua/llimits.h
+++ b/module/lua/llimits.h
@@ -97,8 +97,10 @@ typedef LUAI_UACNUMBER l_uacNumber;
/*
** non-return type
+**
+** Supress noreturn attribute in kernel builds to avoid objtool check warnings
*/
-#if defined(__GNUC__)
+#if defined(__GNUC__) && !defined(_KERNEL)
#define l_noret void __attribute__((noreturn))
#elif defined(_MSC_VER)
#define l_noret void __declspec(noreturn)