1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

LibC: Time-related POSIX compliance fixes.

This commit is contained in:
Andreas Kling 2019-03-27 01:31:53 +01:00
parent abd5931184
commit aef6030a80
7 changed files with 19 additions and 3 deletions

View file

@ -1,4 +1,5 @@
#include <time.h>
#include <sys/time.h>
#include <errno.h>
#include <assert.h>
#include <Kernel/Syscall.h>
@ -16,7 +17,7 @@ time_t time(time_t* tloc)
return tv.tv_sec;
}
int gettimeofday(struct timeval* tv, struct timezone*)
int gettimeofday(struct timeval* __restrict__ tv, void* __restrict__)
{
int rc = syscall(SC_gettimeofday, tv);
__RETURN_WITH_ERRNO(rc, rc, -1);