diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-03-16 14:15:57 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-03-23 12:49:23 -0700 |
commit | 738eef46aab0319aef1045cf136289309b396581 (patch) | |
tree | d119c86ec3ff07de4a24b38a87299bf187a0a54f /include | |
parent | 2a0347b709ffe54b6dd0a465922842d0b5b04b0a (diff) |
fix MTIME_SEC_MAX on 32-bit
The maximum seconds value we can handle on 32bit is LONG_MAX.
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ktime.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h index 611f17f79ee..83ae2e78a78 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: |