projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add tcgetwinsize and tcsetwinsize functions, move struct winsize
[musl]
/
src
/
time
/
utime.c
diff --git
a/src/time/utime.c
b/src/time/utime.c
index
856315b
..
e7592b2
100644
(file)
--- a/
src/time/utime.c
+++ b/
src/time/utime.c
@@
-1,7
+1,11
@@
#include <utime.h>
#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)
{
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);
}
}