projects
/
unionfs-2.6.39.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
812b03d
)
fix MTIME_SEC_MAX on 32-bit
author
Thomas Gleixner
<tglx@linutronix.de>
Sun, 8 Apr 2007 22:54:30 +0000
(
00:54
+0200)
committer
Adrian Bunk
<bunk@stusta.de>
Sun, 8 Apr 2007 22:54:30 +0000
(
00:54
+0200)
The maximum seconds value we can handle on 32bit is LONG_MAX.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
include/linux/ktime.h
patch
|
blob
|
history
diff --git
a/include/linux/ktime.h
b/include/linux/ktime.h
index f106701d7dbd87cab64662070e67f2fdf99be02f..4548ddb3cfc3061bd5a8e412708c47fc0da1d310 100644
(file)
--- 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: