From: Anton Blanchard From: Marcus Meissner With 2.6.4 we now have the glorious hidden d_type passing in getdents. glibc CVS expects this to be passed if we have a kernel version after 2.6.4, so we have to also handle it in the 32bit syscall converter. --- 25-akpm/arch/ppc64/kernel/sys_ppc32.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN arch/ppc64/kernel/sys_ppc32.c~ppc64-d_type-fix arch/ppc64/kernel/sys_ppc32.c --- 25/arch/ppc64/kernel/sys_ppc32.c~ppc64-d_type-fix 2004-03-23 17:50:32.255661336 -0800 +++ 25-akpm/arch/ppc64/kernel/sys_ppc32.c 2004-03-23 17:50:32.259660728 -0800 @@ -534,7 +534,7 @@ filldir(void * __buf, const char * name, { struct linux_dirent32 * dirent; struct getdents_callback32 * buf = (struct getdents_callback32 *) __buf; - int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); + int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 2); buf->error = -EINVAL; /* only used if we fail.. */ if (reclen > buf->count) @@ -548,6 +548,7 @@ filldir(void * __buf, const char * name, put_user(reclen, &dirent->d_reclen); copy_to_user(dirent->d_name, name, namlen); put_user(0, dirent->d_name + namlen); + put_user(d_type, (char *) dirent + reclen - 1); ((char *) dirent) += reclen; buf->current_dir = dirent; buf->count -= reclen; _