summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-04-09 00:54:30 +0200
committerAdrian Bunk <bunk@stusta.de>2007-04-09 00:54:30 +0200
commit19b5054d01f856a189659a59b24c8497b038cb43 (patch)
tree651f2c4757112cc3d72e8b07e59a17bf9d395993
parent812b03dc31229847825989f5e35359a7c4dff6f4 (diff)
fix MTIME_SEC_MAX on 32-bit
The maximum seconds value we can handle on 32bit is LONG_MAX. Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r--include/linux/ktime.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index f106701d7dbd..4548ddb3cfc3 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: