浏览代码

compat: Introduce COMPAT_USE_64BIT_TIME

Allow a compatibility ABI to use a 64-bit time_t and 64-bit members in
struct timeval and struct timespec to avoid the Y2038 problem.

This will be used for the x32 ABI.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
H. J. Lu 13 年之前
父节点
当前提交
45e8778129
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      include/linux/compat.h

+ 4 - 0
include/linux/compat.h

@@ -19,6 +19,10 @@
 #include <asm/siginfo.h>
 #include <asm/siginfo.h>
 #include <asm/signal.h>
 #include <asm/signal.h>
 
 
+#ifndef COMPAT_USE_64BIT_TIME
+#define COMPAT_USE_64BIT_TIME 0
+#endif
+
 #define compat_jiffies_to_clock_t(x)	\
 #define compat_jiffies_to_clock_t(x)	\
 		(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
 		(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)