summaryrefslogtreecommitdiff
path: root/lib/libc/utime/utime.c
blob: 8d6b91c6f2609a97ac68544d2df021c878c953ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <utime.h>
#include <sys/time.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);
}