summaryrefslogtreecommitdiffhomepage
path: root/vdso/vdso.cc
diff options
context:
space:
mode:
Diffstat (limited to 'vdso/vdso.cc')
-rw-r--r--vdso/vdso.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/vdso/vdso.cc b/vdso/vdso.cc
index 62f59766d..3b6653b5d 100644
--- a/vdso/vdso.cc
+++ b/vdso/vdso.cc
@@ -132,6 +132,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;