From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 81D4F3858D33; Fri, 20 Jan 2023 19:36:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81D4F3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674243404; bh=s4X7tjYFxZW9L7niylMqWBhAr7ijLFUoNbtPLJOlp88=; h=From:To:Subject:Date:From; b=T79ze6sWxx1HNEaljmlbFyT6UxPZm+pU4ZPNgUfG9H4o5bVGdpqkPzdqfaxxPuMkR mEHka/CfqDoKSHZE8TZJN8Ww70DbhAMemwTFF0Yyl1cMyGpOvzMckRrmMg2STEwj/M LoYHRIBP3gvMGUTQoPVhati+Z1wcME74cLL78NIY= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Thomas Schwinge To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] nvptx: Provide stub 'gettimeofday' X-Act-Checkin: newlib-cygwin X-Git-Author: Thomas Schwinge X-Git-Refname: refs/heads/master X-Git-Oldrev: 8af65b8c143bf5959ffd98dd52c76ab9a7388843 X-Git-Newrev: 52cb9370044d11a29ae0dc1120ffdf246f5abc20 Message-Id: <20230120193644.81D4F3858D33@sourceware.org> Date: Fri, 20 Jan 2023 19:36:44 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D52cb9370044= d11a29ae0dc1120ffdf246f5abc20 commit 52cb9370044d11a29ae0dc1120ffdf246f5abc20 Author: Thomas Schwinge Date: Tue Jan 17 16:01:02 2023 +0100 nvptx: Provide stub 'gettimeofday' =20 Instead of them FAILing due to 'unresolved symbol gettimeofday', this makes PASS a number of GCC 'gfortran.dg' test cases, for example. Diff: --- newlib/libc/machine/nvptx/misc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/newlib/libc/machine/nvptx/misc.c b/newlib/libc/machine/nvptx/m= isc.c index ef76eaae1..897ddc807 100644 --- a/newlib/libc/machine/nvptx/misc.c +++ b/newlib/libc/machine/nvptx/misc.c @@ -16,6 +16,8 @@ #include #include #include +#include + #undef errno extern int errno; =20 @@ -29,6 +31,11 @@ fstat (int fd, struct stat *buf) { return -1; } =20 +int +gettimeofday (struct timeval *tv, void *tz) { + return -1; +} + int isatty (int fd) { return fd =3D=3D 1;