]> sourceware.org Git - newlib-cygwin.git/commitdiff
nvptx: Provide stub 'gettimeofday'
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 17 Jan 2023 15:01:02 +0000 (16:01 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Thu, 19 Jan 2023 20:50:57 +0000 (21:50 +0100)
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

index ef76eaae112e9a98780f4313ec9fce122103f28b..897ddc807737ef6f5722a8cd000258a8e4817469 100644 (file)
@@ -16,6 +16,8 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/time.h>
+
 #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;
This page took 0.032083 seconds and 5 git commands to generate.