add obsolete futimesat()
authorrofl0r <retnyg@gmx.net>
Thu, 6 Dec 2012 18:29:38 +0000 (19:29 +0100)
committerrofl0r <retnyg@gmx.net>
Thu, 6 Dec 2012 19:27:54 +0000 (20:27 +0100)
this function is obsolete, however it's available as a syscall
and as such qemu userspace emulation tries to forward it to the
host kernel.

include/sys/time.h
src/stat/futimesat.c [new file with mode: 0644]

index a0ed8e0..559e817 100644 (file)
@@ -31,6 +31,7 @@ int utimes (const char *, const struct timeval [2]);
 
 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int futimes(int, const struct timeval [2]);
+int futimesat(int, const char *, const struct timeval [2]);
 int lutimes(const char *, const struct timeval [2]);
 int settimeofday (const struct timeval *, void *);
 int adjtime (const struct timeval *, struct timeval *);
diff --git a/src/stat/futimesat.c b/src/stat/futimesat.c
new file mode 100644 (file)
index 0000000..0cc1854
--- /dev/null
@@ -0,0 +1,9 @@
+#include <sys/time.h>
+#include "syscall.h"
+
+#ifdef SYS_futimesat
+int futimesat(int dirfd, const char *pathname, const struct timeval times[2])
+{
+       return syscall(SYS_futimesat, dirfd, pathname, times);
+}
+#endif