Skip to content

Commit

Permalink
Implement _gettimeofday_r
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift authored and frangarcj committed Jul 22, 2021
1 parent 855e4a9 commit a0ddc7e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions newlib/libc/sys/vita/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,13 @@ _getpid_r(struct _reent *reent)
int
_gettimeofday_r(struct _reent *reent, struct timeval *ptimeval, void *ptimezone)
{
reent->_errno = ENOSYS;
return -1;
int ret = sceKernelLibcGettimeofday(ptimeval, ptimezone);
if (ret < 0) {
reent->_errno = ret & SCE_ERRNO_MASK;
return -1;
}
reent->_errno = 0;
return 0;
}

int
Expand Down

0 comments on commit a0ddc7e

Please sign in to comment.