fix wrong sigaction syscall ABI on mips*, or1k, microblaze, riscv64
[musl] / src / time / utime.c
index 856315b..e7592b2 100644 (file)
@@ -1,7 +1,11 @@
 #include <utime.h>
-#include "syscall.h"
+#include <sys/stat.h>
+#include <time.h>
+#include <fcntl.h>
 
 int utime(const char *path, const struct utimbuf *times)
 {
-       return syscall(SYS_utime, path, times);
+       return utimensat(AT_FDCWD, path, times ? ((struct timespec [2]){
+               { .tv_sec = times->actime }, { .tv_sec = times->modtime }})
+               : 0, 0);
 }