From: Thomas Gleixner Date: Sun, 8 Apr 2007 22:54:30 +0000 (+0200) Subject: fix MTIME_SEC_MAX on 32-bit X-Git-Tag: v2.6.16.47-rc1~4 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=19b5054d01f856a189659a59b24c8497b038cb43;p=unionfs-2.6.39.y.git fix MTIME_SEC_MAX on 32-bit The maximum seconds value we can handle on 32bit is LONG_MAX. Signed-off-by: Adrian Bunk --- diff --git a/include/linux/ktime.h b/include/linux/ktime.h index f106701d7db..4548ddb3cfc 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -57,7 +57,11 @@ typedef union { } ktime_t; #define KTIME_MAX ((s64)~((u64)1 << 63)) -#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) +#if (BITS_PER_LONG == 64) +# define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) +#else +# define KTIME_SEC_MAX LONG_MAX +#endif /* * ktime_t definitions when using the 64-bit scalar representation: