diff options
Diffstat (limited to 'libc/misc/time/utimes.c')
-rw-r--r-- | libc/misc/time/utimes.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/misc/time/utimes.c b/libc/misc/time/utimes.c new file mode 100644 index 000000000..364bf83e7 --- /dev/null +++ b/libc/misc/time/utimes.c @@ -0,0 +1,16 @@ +#include <utime.h> +#include <sys/time.h> + +int utimes(const char *path, struct timeval tvp[2]) +{ + struct utimbuf buf, *times; + + if (tvp) { + times = &buf; + times->actime = tvp[0].tv_sec; + times->modtime = tvp[1].tv_sec; + } + else + times = NULL; + return utime(path, times); +} |