Procházet zdrojové kódy

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.
Linus Groh před 4 roky
rodič
revize
8db54f9ef4
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      Userland/Libraries/LibC/time.cpp

+ 2 - 1
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)