* configure.host (sh*-*-*): Add -DHAVE_GETTIMEOFDAY to newlib_cflags.
* libc/sys/sh/syscalls.c (_gettimeofday): New.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
#include <_ansi.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include "sys/syscall.h"
|
||||
int errno;
|
||||
|
||||
@ -174,3 +175,11 @@ _pipe (int *fd)
|
||||
{
|
||||
return __trap34 (SYS_pipe, fd);
|
||||
}
|
||||
|
||||
int
|
||||
_gettimeofday (struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
tv->tv_usec = 0;
|
||||
tv->tv_sec = __trap34 (SYS_time);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user