From 5ad0a03d181a57d718050314209c4f3b4f18d7bf Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Wed, 16 Sep 2015 11:19:34 +0900 Subject: [PATCH] make gettimeofday handle second parameter (timezone) --- kernel/syscall.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/syscall.c b/kernel/syscall.c index 2bab3bf7..d824b25c 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -4976,9 +4976,10 @@ SYSCALL_DECLARE(gettimeofday) { struct timeval *tv = (struct timeval *)ihk_mc_syscall_arg0(ctx); struct syscall_request request IHK_DMA_ALIGN; + struct timezone *tz = (struct timezone *)ihk_mc_syscall_arg1(ctx); /* Do it locally if supported */ - if (gettime_local_support) { + if (!tz && gettime_local_support) { update_cpu_local_time(); /* Check validity of argument */ @@ -4997,6 +4998,7 @@ SYSCALL_DECLARE(gettimeofday) /* Otherwise offload */ request.number = __NR_gettimeofday; request.args[0] = (unsigned long)tv; + request.args[1] = (unsigned long)tz; return do_syscall(&request, ihk_mc_get_processor_id(), 0); }