From 52cb9370044d11a29ae0dc1120ffdf246f5abc20 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 17 Jan 2023 16:01:02 +0100 Subject: [PATCH] nvptx: Provide stub 'gettimeofday' Instead of them FAILing due to 'unresolved symbol gettimeofday', this makes PASS a number of GCC 'gfortran.dg' test cases, for example. --- 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/misc.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; @@ -29,6 +31,11 @@ fstat (int fd, struct stat *buf) { return -1; } +int +gettimeofday (struct timeval *tv, void *tz) { + return -1; +} + int isatty (int fd) { return fd == 1;