提交 eda8e9da 编写于 作者: R Rich Felker

implement futimens and utimensat

上级 b1b465c4
......@@ -86,6 +86,9 @@ int mkdirat(int, const char *, mode_t);
int mknodat(int, const char *, mode_t, dev_t);
int mkfifoat(int, const char *, mode_t);
int futimens(int, const struct timespec [2]);
int utimensat(int, const char *, const struct timespec [2], int);
#ifdef _BSD_SOURCE
int lchmod(const char *, mode_t);
#endif
......
#include <sys/stat.h>
int futimens(int fd, const struct timespec times[2])
{
return utimensat(fd, 0, times, 0);
}
#include <sys/stat.h>
#include "syscall.h"
int utimensat(int fd, const char *path, const struct timespec times[2], int flags)
{
return syscall4(__NR_utimensat, fd, (long)path, (long)times, flags);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册