summaryrefslogtreecommitdiffhomepage
path: root/vdso
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-03-03 18:13:56 -0800
committergVisor bot <gvisor-bot@google.com>2020-03-03 18:13:56 -0800
commitd949c33143bd934a42d6a0645483d32526d858a2 (patch)
treeddab2ea6f95766eb64e2f79bc1dc5f2dfea4ca63 /vdso
parent122d47aed17abf4301596e19fc8ac9cdad8118d9 (diff)
parent99e395e3b1379c12a382544d597dc12bd9293592 (diff)
Merge pull request #2009 from lubinszARM:pr_syscall_getres
PiperOrigin-RevId: 298740246
Diffstat (limited to 'vdso')
-rw-r--r--vdso/vdso.cc4
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;