Index: qemu/linux-user/arm/syscall_nr.h =================================================================== --- qemu.orig/linux-user/arm/syscall_nr.h 2007-09-24 15:22:35.000000000 -0600 +++ qemu/linux-user/arm/syscall_nr.h 2007-09-24 15:22:58.000000000 -0600 @@ -325,3 +325,4 @@ #define TARGET_NR_mbind 319 #define TARGET_NR_get_mempolicy 320 #define TARGET_NR_set_mempolicy 321 +#define TARGET_NR_utimensat 348 Index: qemu/linux-user/i386/syscall_nr.h =================================================================== --- qemu.orig/linux-user/i386/syscall_nr.h 2007-09-24 15:22:42.000000000 -0600 +++ qemu/linux-user/i386/syscall_nr.h 2007-09-24 15:22:58.000000000 -0600 @@ -275,3 +275,5 @@ #define TARGET_NR_utimes 271 #define TARGET_NR_set_robust_list 311 + +#define TARGET_NR_utimensat 320 Index: qemu/linux-user/syscall.c =================================================================== --- qemu.orig/linux-user/syscall.c 2007-09-24 15:22:50.000000000 -0600 +++ qemu/linux-user/syscall.c 2007-09-24 15:41:51.000000000 -0600 @@ -146,6 +146,7 @@ #define __NR_sys_syslog __NR_syslog #define __NR_sys_tgkill __NR_tgkill #define __NR_sys_tkill __NR_tkill +#define __NR_sys_utimensat __NR_utimensat #if defined(__alpha__) || defined (__ia64__) || defined(__x86_64__) #define __NR__llseek __NR_lseek @@ -180,6 +181,10 @@ #if defined(TARGET_NR_set_tid_address) && defined(__NR_set_tid_address) _syscall1(int,set_tid_address,int *,tidptr) #endif +#if defined(TARGET_NR_utimensat) && defined(__NR_utimensat) +_syscall4(int,sys_utimensat,int,dirfd,const char *,pathname, + const struct timespec *,tsp,int,flags) +#endif extern int personality(int); extern int flock(int, int); @@ -4653,6 +4658,27 @@ goto unimplemented_nowarn; #endif +#if defined(TARGET_NR_utimensat) && defined(__NR_utimensat) + case TARGET_NR_utimensat: + { + struct timespec ts[2]; + target_to_host_timespec(ts, arg3); + target_to_host_timespec(ts+1, arg3+sizeof(struct target_timespec)); + if (!arg2) + ret = get_errno(sys_utimensat(arg1, NULL, ts, arg4)); + else { + p = lock_user_string(arg2); + if (!access_ok(VERIFY_READ, p, 1)) + ret = -EFAULT; + else + ret = get_errno(sys_utimensat(arg1, path(p), ts, arg4)); + if (p) + unlock_user(p, arg2, 0); + } + } + break; +#endif + default: unimplemented: gemu_log("qemu: Unsupported syscall: %d\n", num);