From 99e395e3b1379c12a382544d597dc12bd9293592 Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Fri, 28 Feb 2020 14:52:01 +0800 Subject: passed the syscall test case 'clock_getres' on Arm64 platform Test command: bazel test //test/syscalls:clock_getres_test_runsc_ptrace Signed-off-by: Bin Lu --- vdso/vdso.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vdso/vdso.cc b/vdso/vdso.cc index 8bb80a7a4..c2585d592 100644 --- a/vdso/vdso.cc +++ b/vdso/vdso.cc @@ -126,6 +126,10 @@ extern "C" int __kernel_clock_getres(clockid_t clock, struct timespec* res) { case CLOCK_REALTIME: case CLOCK_MONOTONIC: case CLOCK_BOOTTIME: { + if (res == nullptr) { + return 0; + } + res->tv_sec = 0; res->tv_nsec = 1; break; -- cgit v1.2.3