projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
report that posix_spawn is supported in unistd.h and sysconf
[musl]
/
src
/
time
/
utime.c
diff --git
a/src/time/utime.c
b/src/time/utime.c
index
56e9e13
..
b2b5741
100644
(file)
--- a/
src/time/utime.c
+++ b/
src/time/utime.c
@@
-1,12
+1,14
@@
#include <utime.h>
#include <utime.h>
+#include <sys/time.h>
#include "syscall.h"
int utime(const char *path, const struct utimbuf *times)
{
#include "syscall.h"
int utime(const char *path, const struct utimbuf *times)
{
- long ktimes[2];
if (times) {
if (times) {
- ktimes[0] = times->actime;
- ktimes[1] = times->modtime;
+ struct timeval tv[2] = {
+ { .tv_sec = times->actime },
+ { .tv_sec = times->modtime } };
+ return syscall(SYS_utimes, path, tv);
}
}
- return syscall
2(__NR_utime, (long)path, times ? (long)ktimes :
0);
+ return syscall
(SYS_utimes, path,
0);
}
}