linux-user: enable getdents for > 32-bit systems
authorUlrich Hecht <uli@suse.de>
Fri, 24 Jul 2009 17:10:28 +0000 (19:10 +0200)
committerRiku Voipio <riku.voipio@iki.fi>
Tue, 25 Aug 2009 14:15:34 +0000 (17:15 +0300)
works perfectly fine with the example from getdents(2) and passes the LTP
tests (tested with s390x on x86_64 emulation)

Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user/syscall.c

index e69f0fd6cdfd5a8a082fac01cfede9949261730e..a7de1547038e5e9ed3e75fa309a254de2f5359fb 100644 (file)
@@ -196,9 +196,7 @@ static int gettid(void) {
     return -ENOSYS;
 }
 #endif
-#if TARGET_ABI_BITS == 32
 _syscall3(int, sys_getdents, uint, fd, struct linux_dirent *, dirp, uint, count);
-#endif
 #if defined(TARGET_NR_getdents64) && defined(__NR_getdents64)
 _syscall3(int, sys_getdents64, uint, fd, struct linux_dirent64 *, dirp, uint, count);
 #endif
@@ -5795,9 +5793,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
         break;
 #endif
     case TARGET_NR_getdents:
-#if TARGET_ABI_BITS != 32
-        goto unimplemented;
-#elif TARGET_ABI_BITS == 32 && HOST_LONG_BITS == 64
+#if TARGET_ABI_BITS == 32 && HOST_LONG_BITS == 64
         {
             struct target_dirent *target_dirp;
             struct linux_dirent *dirp;