mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:37:43 +00:00
LibC: Add nanosleep() wrapper around clock_nanosleep(CLOCK_REALTIME)
Gets rid of one dropbear patch. :^)
This commit is contained in:
parent
57b6f51137
commit
c88ea2f54a
3 changed files with 6 additions and 11 deletions
|
@ -330,6 +330,11 @@ int clock_nanosleep(clockid_t clock_id, int flags, const struct timespec* reques
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int nanosleep(const struct timespec* requested_sleep, struct timespec* remaining_sleep)
|
||||
{
|
||||
return clock_nanosleep(CLOCK_REALTIME, 0, requested_sleep, remaining_sleep);
|
||||
}
|
||||
|
||||
int clock_getres(clockid_t, struct timespec*)
|
||||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
|
|
|
@ -77,6 +77,7 @@ int clock_gettime(clockid_t, struct timespec*);
|
|||
int clock_settime(clockid_t, struct timespec*);
|
||||
int clock_nanosleep(clockid_t, int flags, const struct timespec* requested_sleep, struct timespec* remaining_sleep);
|
||||
int clock_getres(clockid_t, struct timespec* result);
|
||||
int nanosleep(const struct timespec* requested_sleep, struct timespec* remaining_sleep);
|
||||
struct tm* gmtime_r(const time_t* timep, struct tm* result);
|
||||
struct tm* localtime_r(const time_t* timep, struct tm* result);
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
Hinders security by a little, but I guess we'll just have nanosleep soon enough.
|
||||
--- a/svr-auth.c.orig
|
||||
+++ b/svr-auth.c
|
||||
@@ -424,7 +424,6 @@
|
||||
if (!fuzz.fuzzing)
|
||||
#endif
|
||||
{
|
||||
- while (nanosleep(&delay, &delay) == -1 && errno == EINTR) { /* Go back to sleep */ }
|
||||
}
|
||||
|
||||
ses.authstate.failcount++;
|
Loading…
Add table
Add a link
Reference in a new issue