utime.c\time\src - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/time/utime.c
blob: e7592b297809c817a2ec9ca4368be1f37147920b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <utime.h>
#include <sys/stat.h>
#include <time.h>
#include <fcntl.h>
int utime(const char *path, const struct utimbuf *times)
{
	return utimensat(AT_FDCWD, path, times ? ((struct timespec [2]){
		{ .tv_sec = times->actime }, { .tv_sec = times->modtime }})
		: 0, 0);
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月04日 10:30:58 +0000

AltStyle によって変換されたページ (->オリジナル) /