Skip to content

Commit

Permalink
compat: Introduce COMPAT_USE_64BIT_TIME
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H. J. Lu authored and H. Peter Anvin committed Feb 20, 2012
1 parent 109a1f3 commit 45e8778
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#include <asm/siginfo.h>
#include <asm/signal.h>

#ifndef COMPAT_USE_64BIT_TIME
#define COMPAT_USE_64BIT_TIME 0
#endif

#define compat_jiffies_to_clock_t(x) \
(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)

Expand Down

0 comments on commit 45e8778

Please sign in to comment.