1 /* vi: set sw=4 ts=4: */
2 /*
3  * futimens() implementation for uClibc
4  *
5  * Copyright (C) 2009 Bernhard Reutner-Fischer <uclibc@uclibc.org>
6  *
7  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8  */
9 
10 #include <sys/syscall.h>
11 #include <time.h>
12 #ifdef __NR_utimensat
13 /* To avoid superfluous warnings about passing NULL to the non-null annotated
14  * 2nd param "__path" below, we bypass inclusion of sys/stat.h and use
15  * a non annotated, local decl.
16  * Note that due to not including the header, we have to alias the call
17  * manually.
18  */
19 extern int utimensat (int __fd, const char *__path,
20 	const struct timespec __times[2],
21 	int __flags) __THROW;
22 libc_hidden_proto(utimensat)
23 
24 int futimens (int __fd, const struct timespec __times[2]) __THROW;
futimens(int fd,const struct timespec ts[2])25 int futimens (int fd, const struct timespec ts[2])
26 {
27 	return utimensat(fd, 0, ts, 0);
28 }
29 #endif
30