yann@1819: From 13545bce877b33e30155fc412ad44cc118d83f77 Mon Sep 17 00:00:00 2001 yann@1819: From: Atsushi Nemoto yann@1819: Date: Sat, 30 Jan 2010 00:24:37 +0900 yann@1819: Subject: [PATCH 15/15] getdents: Fix mips64 build yann@1819: yann@1819: On Wed, 27 Jan 2010 07:14:08 +0100, Carmelo AMOROSO wrote: yann@1819: > I would re-write your patch in a simpler way. yann@1819: > yann@1819: > We already have the following yann@1819: > yann@1819: > 136 #if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64 yann@1819: > 137 attribute_hidden strong_alias(__getdents,__getdents64) yann@1819: > 138 #endif yann@1819: > yann@1819: > I think that it's simpler to move in the proper place this statement. yann@1819: yann@1819: Thanks, indeed. If we came into "#elif WORDSIZE == 32" block, above yann@1819: condition never be true. So we can just move this statement out of yann@1819: "#if...#elif...#elif...#endif" block. Here is a revised patch. yann@1819: yann@1819: ------------------------------------------------------ yann@1819: From: Atsushi Nemoto yann@1819: Subject: [PATCH] getdents: Fix mips64 build yann@1819: yann@1819: Some archs (such as mips64) do not have getdents64 syscall but have yann@1819: getdents syscall. Define alias for it. yann@1819: yann@1819: This fixes regression from 0.9.30.1. yann@1819: yann@1819: Backgrounds: yann@1819: This is once done by commit e8b1c674. But after the commit 33bcf733 yann@1819: ("Use getdents syscall if kernel provide supports for this instead of yann@1819: relying upon getdents64."), if __ASSUME_GETDENTS32_D_TYPE was defined yann@1819: the alias for getdents64 is not defined. The macro yann@1819: __ASSUME_GETDENTS32_D_TYPE had been effectively ignored until 0.9.30.1 yann@1819: but the commit 0f0f20ab ("Move kernel-features.h header from the yann@1819: linuxthread directory to a common one...") really enables it. yann@1819: yann@1819: Signed-off-by: Atsushi Nemoto yann@1819: Signed-off-by: Khem Raj yann@1819: Signed-off-by: Bernhard Reutner-Fischer yann@1819: --- yann@1819: libc/sysdeps/linux/common/getdents.c | 8 ++++---- yann@1819: 1 files changed, 4 insertions(+), 4 deletions(-) yann@1819: yann@1819: diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c yann@1819: index b518cc0..66a03b3 100644 yann@1819: --- a/libc/sysdeps/linux/common/getdents.c yann@1819: +++ b/libc/sysdeps/linux/common/getdents.c yann@1819: @@ -136,10 +136,6 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes) yann@1819: return (char *) dp - buf; yann@1819: } yann@1819: yann@1819: -#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64 yann@1819: -attribute_hidden strong_alias(__getdents,__getdents64) yann@1819: -#endif yann@1819: - yann@1819: #elif __WORDSIZE == 32 yann@1819: yann@1819: /* Experimentally off - libc_hidden_proto(memmove) */ yann@1819: @@ -171,4 +167,8 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes) yann@1819: } yann@1819: #endif yann@1819: yann@1819: +#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64 yann@1819: +attribute_hidden strong_alias(__getdents,__getdents64) yann@1819: +#endif yann@1819: + yann@1819: #endif yann@1819: -- yann@1819: 1.6.6.1 yann@1819: