diff options
author | Bin Lu <bin.lu@arm.com> | 2020-02-28 14:52:01 +0800 |
---|---|---|
committer | Bin Lu <bin.lu@arm.com> | 2020-03-02 10:59:13 +0800 |
commit | 99e395e3b1379c12a382544d597dc12bd9293592 (patch) | |
tree | 871c745ecfb0e69df6bb470c6569341205b2e7ea /vdso/vdso.cc | |
parent | c96bb4d2ebc6a24b3111d986c5d40574ec8ff660 (diff) |
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 <bin.lu@arm.com>
Diffstat (limited to 'vdso/vdso.cc')
-rw-r--r-- | vdso/vdso.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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; |