[PATCH 2/9] compat: Make compat helpers independent of CONFIG_COMPAT

From: Deepa Dinamani
Date: Fri Nov 10 2017 - 17:45:21 EST


Many of the compat time syscalls are also repurposed as 32 bit
native syscalls to provide backward compatibility while adding
new y2038 safe sycalls.
Enabling the helpers makes this possible.

Signed-off-by: Deepa Dinamani <deepa.kernel@xxxxxxxxx>
---
include/linux/compat.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/linux/compat.h b/include/linux/compat.h
index 1a5e397ffcd4..f59f1f2d03de 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -24,6 +24,8 @@
#include <asm/siginfo.h>
#include <asm/signal.h>

+#endif
+
#ifndef COMPAT_USE_64BIT_TIME
#define COMPAT_USE_64BIT_TIME 0
#endif
@@ -59,6 +61,8 @@
} \
static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__))

+#ifdef CONFIG_COMPAT
+
#ifndef compat_user_stack_pointer
#define compat_user_stack_pointer() current_user_stack_pointer()
#endif
--
2.11.0