summaryrefslogtreecommitdiff
path: root/libc/misc/time/utimes.c
blob: 364bf83e7d02323f79da3123f6b8d27fe55d5259 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
}