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