aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-01-17 16:01:02 +0100
committerThomas Schwinge <thomas@codesourcery.com>2023-01-19 21:50:57 +0100
commit52cb9370044d11a29ae0dc1120ffdf246f5abc20 (patch)
tree188d596fb9f589bce9b1f8e8bf9f5bcb0202908e /newlib/libc
parent8af65b8c143bf5959ffd98dd52c76ab9a7388843 (diff)
downloadnewlib-52cb9370044d11a29ae0dc1120ffdf246f5abc20.zip
newlib-52cb9370044d11a29ae0dc1120ffdf246f5abc20.tar.gz
newlib-52cb9370044d11a29ae0dc1120ffdf246f5abc20.tar.bz2
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.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/machine/nvptx/misc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/newlib/libc/machine/nvptx/misc.c b/newlib/libc/machine/nvptx/misc.c
index ef76eaa..897ddc8 100644
--- a/newlib/libc/machine/nvptx/misc.c
+++ b/newlib/libc/machine/nvptx/misc.c
@@ -16,6 +16,8 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/time.h>
+
#undef errno
extern int errno;
@@ -30,6 +32,11 @@ fstat (int fd, struct stat *buf) {
}
int
+gettimeofday (struct timeval *tv, void *tz) {
+ return -1;
+}
+
+int
isatty (int fd) {
return fd == 1;
}