From 0b44a0315b47dd8eced9f3b7f31580cf14bbfc01 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 12 Feb 2011 00:22:29 -0500 Subject: initial check-in, version 0.5.0 --- src/linux/utimes.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/linux/utimes.c (limited to 'src/linux/utimes.c') diff --git a/src/linux/utimes.c b/src/linux/utimes.c new file mode 100644 index 00000000..99a3b2b8 --- /dev/null +++ b/src/linux/utimes.c @@ -0,0 +1,13 @@ +#include +#define SYSCALL_STANDALONE +#include "syscall.h" + +int utimes(const char *path, const struct timeval times[2]) +{ + long ktimes[2]; + if (times) { + ktimes[0] = times[0].tv_sec; + ktimes[1] = times[1].tv_sec; + } + return syscall2(__NR_utime, (long)path, times ? (long)ktimes : 0); +} -- cgit v1.2.1