summaryrefslogtreecommitdiffstats
path: root/usr/klibc/utime.c
blob: bfae2d9e90111e1747053deb56187475148bfc37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * utime.c
 */

#include <utime.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/syscall.h>

int utime(const char *filename, const struct utimbuf *buf)
{
	struct timeval tvp[2];

	tvp[0].tv_sec = buf->actime;
	tvp[0].tv_usec = 0;
	tvp[1].tv_sec = buf->modtime;
	tvp[1].tv_usec = 0;

	return utimes(filename, tvp);
}