From 1be6145fdfffd619667d7c5af4e497b3b25ce91d Mon Sep 17 00:00:00 2001 From: Brian Gianforcaro Date: Sun, 9 Aug 2020 12:45:39 -0700 Subject: [PATCH] Kernel: Modifiy clock_settime timespec argument to const The timeppec paramter is read only, and should be const. --- Kernel/Process.h | 2 +- Kernel/Syscalls/clock.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/Process.h b/Kernel/Process.h index 97ba8f8bc41..20cbc0e80ad 100644 --- a/Kernel/Process.h +++ b/Kernel/Process.h @@ -248,7 +248,7 @@ public: int sys$usleep(useconds_t usec); int sys$gettimeofday(Userspace); int sys$clock_gettime(clockid_t, Userspace); - int sys$clock_settime(clockid_t, timespec*); + int sys$clock_settime(clockid_t, const timespec*); int sys$clock_nanosleep(Userspace); int sys$gethostname(char*, ssize_t); int sys$sethostname(const char*, ssize_t); diff --git a/Kernel/Syscalls/clock.cpp b/Kernel/Syscalls/clock.cpp index 3bac104a2ce..2a56545c763 100644 --- a/Kernel/Syscalls/clock.cpp +++ b/Kernel/Syscalls/clock.cpp @@ -54,7 +54,7 @@ int Process::sys$clock_gettime(clockid_t clock_id, Userspace user_ts) return 0; } -int Process::sys$clock_settime(clockid_t clock_id, timespec* user_ts) +int Process::sys$clock_settime(clockid_t clock_id, const timespec* user_ts) { REQUIRE_PROMISE(settime);