blob: 3d53c5ff0610568bdb66d492f7b96128b9de80ab [file] [log] [blame]
From 1163bebf9739d51e72175f5ba13d9bc6407c6d29 Mon Sep 17 00:00:00 2001
From: Baolin Wang <baolin.wang@linaro.org>
Date: Tue, 3 Apr 2018 00:36:02 +0800
Subject: [PATCH 1737/1795] nios2: Use read_persistent_clock64() instead of
read_persistent_clock()
Since struct timespec is not y2038 safe on 32bit machines, this patch
converts read_persistent_clock() to read_persistent_clock64() using
struct timespec64, as well as converting mktime() to mktime64().
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
(cherry picked from commit 3d9644ef9a0f6c3ca0c1bd2aea1d82e7ea0a7f24)
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
arch/nios2/kernel/time.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/nios2/kernel/time.c b/arch/nios2/kernel/time.c
index 20e86209ef2e..ab88b6dd4679 100644
--- a/arch/nios2/kernel/time.c
+++ b/arch/nios2/kernel/time.c
@@ -336,9 +336,9 @@ static int __init nios2_time_init(struct device_node *timer)
return ret;
}
-void read_persistent_clock(struct timespec *ts)
+void read_persistent_clock64(struct timespec64 *ts)
{
- ts->tv_sec = mktime(2007, 1, 1, 0, 0, 0);
+ ts->tv_sec = mktime64(2007, 1, 1, 0, 0, 0);
ts->tv_nsec = 0;
}
--
2.19.0