chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
move code to its own files
[elogind.git]
/
klibc
/
klibc
/
utime.c
1
/*
2
* utime.c
3
*/
4
5
#include <utime.h>
6
#include <sys/time.h>
7
#include <sys/types.h>
8
#include <sys/syscall.h>
9
10
#ifndef __NR_utime
11
12
int utime(const char *filename, const struct utimbuf *buf)
13
{
14
struct timeval tvp[2];
15
16
tvp[0].tv_sec = buf->actime;
17
tvp[0].tv_usec = 0;
18
tvp[1].tv_sec = buf->modtime;
19
tvp[1].tv_usec = 0;
20
21
return utimes(filename, tvp);
22
}
23
24
#endif