From 8db54f9ef4fc159a95d9293bdee476b3ae09a1ec Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Mon, 18 Jan 2021 18:15:31 +0100 Subject: [PATCH] LibC: Return ENOSYS from clock_getres() rather than asserting This is only a stub function for now, but we can make it even more useful by just hardcoding an error return value rather than asserting. --- Userland/Libraries/LibC/time.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibC/time.cpp b/Userland/Libraries/LibC/time.cpp index 349f198374..e6e9f06c66 100644 --- a/Userland/Libraries/LibC/time.cpp +++ b/Userland/Libraries/LibC/time.cpp @@ -372,7 +372,8 @@ int nanosleep(const struct timespec* requested_sleep, struct timespec* remaining int clock_getres(clockid_t, struct timespec*) { dbgln("FIXME: Implement clock_getres()"); - TODO(); + auto rc = -ENOSYS; + __RETURN_WITH_ERRNO(rc, rc, -1); } double difftime(time_t t1, time_t t0)