From 610b895aa1cb734fd656c8fbb22c74eb97075bed Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 25 Jan 2001 21:40:28 +0000 Subject: * configure.host (sh*-*-*): Add -DHAVE_GETTIMEOFDAY to newlib_cflags. * libc/sys/sh/syscalls.c (_gettimeofday): New. --- newlib/libc/sys/sh/syscalls.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'newlib/libc/sys/sh/syscalls.c') diff --git a/newlib/libc/sys/sh/syscalls.c b/newlib/libc/sys/sh/syscalls.c index 3626c0a44..f9761145f 100644 --- a/newlib/libc/sys/sh/syscalls.c +++ b/newlib/libc/sys/sh/syscalls.c @@ -1,6 +1,7 @@ #include <_ansi.h> #include #include +#include #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; +} -- cgit v1.2.3