1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

Lots of minor compat stuff while seeing if bash would build.

We're quite far from bash building, but we'll get there eventually!
This commit is contained in:
Andreas Kling 2018-11-05 16:40:48 +01:00
parent e4611248c4
commit e76312ab63
21 changed files with 172 additions and 38 deletions

View file

@ -6,13 +6,14 @@ extern "C" {
time_t time(time_t* tloc)
{
timeval tv;
if (gettimeofday(&tv) < 0)
struct timeval tv;
struct timezone tz;
if (gettimeofday(&tv, &tz) < 0)
return (time_t)-1;
return tv.tv_sec;
}
int gettimeofday(timeval* tv)
int gettimeofday(struct timeval* tv, struct timezone*)
{
int rc = Syscall::invoke(Syscall::PosixGettimeofday, (dword)tv);
__RETURN_WITH_ERRNO(rc, rc, -1);