public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] nvptx: Provide stub 'gettimeofday'
@ 2023-01-20 19:36 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-01-20 19:36 UTC (permalink / raw)
  To: newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=52cb9370044d11a29ae0dc1120ffdf246f5abc20

commit 52cb9370044d11a29ae0dc1120ffdf246f5abc20
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Tue Jan 17 16:01:02 2023 +0100

    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.

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/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 <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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-20 19:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-20 19:36 [newlib-cygwin] nvptx: Provide stub 'gettimeofday' Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).