diff options
-rw-r--r-- | config/kernel-objtool.m4 | 5 | ||||
-rw-r--r-- | include/sys/frame.h | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/config/kernel-objtool.m4 b/config/kernel-objtool.m4 index bf60e7869..c560c4195 100644 --- a/config/kernel-objtool.m4 +++ b/config/kernel-objtool.m4 @@ -6,10 +6,11 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_OBJTOOL], [ dnl # 4.6 API for compile-time stack validation ZFS_LINUX_TEST_SRC([objtool], [ #undef __ASSEMBLY__ + #include <asm/ptrace.h> #include <asm/frame.h> ],[ #if !defined(FRAME_BEGIN) - CTASSERT(1); + #error "FRAME_BEGIN is not defined" #endif ]) @@ -18,7 +19,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_OBJTOOL], [ #include <linux/frame.h> ],[ #if !defined(STACK_FRAME_NON_STANDARD) - CTASSERT(1); + #error "STACK_FRAME_NON_STANDARD is not defined." #endif ]) ]) diff --git a/include/sys/frame.h b/include/sys/frame.h index 2865dbb57..b6bbaa79b 100644 --- a/include/sys/frame.h +++ b/include/sys/frame.h @@ -23,7 +23,8 @@ extern "C" { #endif -#if defined(__KERNEL__) && defined(HAVE_STACK_FRAME_NON_STANDARD) +#if defined(__KERNEL__) && defined(HAVE_KERNEL_OBJTOOL) && \ + defined(HAVE_STACK_FRAME_NON_STANDARD) #include <linux/frame.h> #else #define STACK_FRAME_NON_STANDARD(func) |