diff --git a/include/linux/compat.h b/include/linux/compat.h index 081281ad5772..3f35f4cfb98d 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -8,8 +8,6 @@ #include -#ifdef CONFIG_COMPAT - #include #include /* for HZ */ #include @@ -20,9 +18,11 @@ #include #include +#ifdef CONFIG_COMPAT #include #include #include +#endif #ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER /* @@ -83,6 +83,8 @@ static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) #endif /* COMPAT_SYSCALL_DEFINEx */ +#ifdef CONFIG_COMPAT + #ifndef compat_user_stack_pointer #define compat_user_stack_pointer() current_user_stack_pointer() #endif @@ -1016,7 +1018,9 @@ static inline struct compat_timeval ns_to_compat_timeval(s64 nsec) #else /* !CONFIG_COMPAT */ #define is_compat_task() (0) +#ifndef in_compat_syscall static inline bool in_compat_syscall(void) { return false; } +#endif #endif /* CONFIG_COMPAT */