From f95a4a932476be2ba99e2fd081e8d2bc6ea12813 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 15 Dec 2017 09:38:53 -0500 Subject: Import newlib and create makefile --- newlib/libc/sys/sparc64/utime2.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 newlib/libc/sys/sparc64/utime2.c (limited to 'newlib/libc/sys/sparc64/utime2.c') diff --git a/newlib/libc/sys/sparc64/utime2.c b/newlib/libc/sys/sparc64/utime2.c new file mode 100644 index 0000000..5f01e3b --- /dev/null +++ b/newlib/libc/sys/sparc64/utime2.c @@ -0,0 +1,26 @@ +/* utime() system call for sunos4 */ + +#ifndef __svr4__ + +#include +#include +#include + +int +utime (char *path, struct utimbuf *times) +{ + if (times != NULL) + { + struct timeval timevals[2]; + + timevals[0].tv_sec = (long int) times->actime; + timevals[0].tv_usec = 0; + timevals[1].tv_sec = (long int) times->modtime; + timevals[1].tv_usec = 0; + return utimes (path, timevals); + } + + return utimes (path, (struct timeval *) 0); +} + +#endif -- cgit v1.2.3