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.
This commit is contained in:
Thomas Schwinge 2023-01-17 16:01:02 +01:00
parent 8af65b8c14
commit 52cb937004
1 changed files with 7 additions and 0 deletions

View File

@ -16,6 +16,8 @@
#include <errno.h> #include <errno.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h>
#undef errno #undef errno
extern int errno; extern int errno;
@ -29,6 +31,11 @@ fstat (int fd, struct stat *buf) {
return -1; return -1;
} }
int
gettimeofday (struct timeval *tv, void *tz) {
return -1;
}
int int
isatty (int fd) { isatty (int fd) {
return fd == 1; return fd == 1;