提交 3d9644ef 编写于 作者: B Baolin Wang 提交者: Ley Foon Tan

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: NBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: NLey Foon Tan <ley.foon.tan@intel.com>
上级 0adb3285
...@@ -336,9 +336,9 @@ static int __init nios2_time_init(struct device_node *timer) ...@@ -336,9 +336,9 @@ static int __init nios2_time_init(struct device_node *timer)
return ret; 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; ts->tv_nsec = 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册