This futimesat() patch for linux-user was never applied.
Index: qemu/linux-user/syscall.c
===================================================================
--- qemu.orig/linux-user/syscall.c	2007-11-20 21:02:40.000000000 -0700
+++ qemu/linux-user/syscall.c	2007-11-20 21:03:59.000000000 -0700
@@ -154,6 +154,7 @@
 #define __NR_sys_faccessat __NR_faccessat
 #define __NR_sys_fchmodat __NR_fchmodat
 #define __NR_sys_fchownat __NR_fchownat
+#define __NR_sys_futimesat __NR_futimesat
 #define __NR_sys_getcwd1 __NR_getcwd
 #define __NR_sys_getdents __NR_getdents
 #define __NR_sys_getdents64 __NR_getdents64
@@ -197,6 +198,10 @@
 _syscall5(int,sys_fchownat,int,dirfd,const char *,pathname,
           uid_t,owner,gid_t,group,int,flags)
 #endif
+#if defined(TARGET_NR_futimesat) && defined(__NR_futimesat)
+_syscall3(int,sys_futimesat,int,dirfd,const char *,pathname,
+          const struct timeval *,times)
+#endif
 _syscall2(int,sys_getcwd1,char *,buf,size_t,size)
 _syscall3(int, sys_getdents, uint, fd, struct dirent *, dirp, uint, count);
 #if defined(TARGET_NR_getdents64) && defined(__NR_getdents64)
@@ -5747,6 +5752,25 @@
 	break;
 #endif
 
+#if defined(TARGET_NR_futimesat) && defined(__NR_futimesat)
+    case TARGET_NR_futimesat:
+        {
+            struct timeval tv[2];
+            if (copy_from_user_timeval(tv, arg3)
+                || copy_from_user_timeval(tv+1, arg3+sizeof(struct target_timeval))) {
+                goto efault;
+            }
+            if (!arg2)
+                ret = get_errno(sys_futimesat(arg1, NULL, tv));
+            else {
+                p = lock_user_string(arg2);
+                ret = get_errno(sys_futimesat(arg1, path(p), tv));
+                unlock_user(p, arg2, 0);
+            }
+        }
+        break;
+#endif
+
 #ifdef TARGET_NR_set_robust_list
     case TARGET_NR_set_robust_list:
 	goto unimplemented_nowarn;

Reply via email to