ntdll: Add an futimens syscall wrapper for Android.

This commit is contained in:
Alexandre Julliard 2013-10-29 10:24:34 +01:00
parent 8b11533dcf
commit 61770be5f1
1 changed files with 12 additions and 0 deletions

View File

@ -36,6 +36,9 @@
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef HAVE_SYS_SYSCALL_H
# include <sys/syscall.h>
#endif
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@ -1654,6 +1657,15 @@ NTSTATUS WINAPI NtSetVolumeInformationFile(
return 0;
}
#if defined(__ANDROID__) && !defined(HAVE_FUTIMENS)
static int futimens( int fd, const struct timespec spec[2] )
{
return syscall( __NR_utimensat, fd, NULL, spec, 0 );
}
#define UTIME_OMIT ((1 << 30) - 2)
#define HAVE_FUTIMENS
#endif /* __ANDROID__ */
static NTSTATUS set_file_times( int fd, const LARGE_INTEGER *mtime, const LARGE_INTEGER *atime )
{
NTSTATUS status = STATUS_SUCCESS;