[PATCH] getdents: Fix mips64 build
Carmelo AMOROSO
carmelo.amoroso at st.com
Wed Jan 27 06:14:08 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Atsushi Nemoto wrote:
> Some archs (such as mips64) do not have getdents64 syscall but have
> getdents syscall. Define alias for it.
>
> This fixes regression from 0.9.30.1.
>
> Backgrounds:
> This is once done by commit e8b1c674. But after the commit 33bcf733
> ("Use getdents syscall if kernel provide supports for this instead of
> relying upon getdents64."), if __ASSUME_GETDENTS32_D_TYPE was defined
> the alias for getdents64 is not defined. The macro
> __ASSUME_GETDENTS32_D_TYPE had been effectively ignored until 0.9.30.1
> but the commit 0f0f20ab ("Move kernel-features.h header from the
> linuxthread directory to a common one...") really enables it.
>
> Signed-off-by: Atsushi Nemoto <anemo at mba.ocn.ne.jp>
> ---
> libc/sysdeps/linux/common/getdents.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/libc/sysdeps/linux/common/getdents.c b/libc/sysdeps/linux/common/getdents.c
> index 6a38772..d21ed9c 100644
> --- a/libc/sysdeps/linux/common/getdents.c
> +++ b/libc/sysdeps/linux/common/getdents.c
> @@ -76,6 +76,10 @@ ssize_t __getdents (int fd, char *buf, size_t nbytes)
> return retval;
> }
>
> +#if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
> +attribute_hidden strong_alias(__getdents,__getdents64)
> +#endif
> +
> #elif ! defined __UCLIBC_HAS_LFS__ || ! defined __NR_getdents64
>
> ssize_t __getdents (int fd, char *buf, size_t nbytes)
Hi,
I would re-write your patch in a simpler way.
We already have the following
136 #if defined __UCLIBC_HAS_LFS__ && ! defined __NR_getdents64
137 attribute_hidden strong_alias(__getdents,__getdents64)
138 #endif
I think that it's simpler to move in the proper place this statement.
Cheers,
Carmelo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAktf2bAACgkQoRq/3BrK1s+MJwCfRpCQHS3DyyMQp+KQHuqADp3L
EiwAn1AQhrFwhf3XJfNhPVonD5+gZhBC
=Aldn
-----END PGP SIGNATURE-----
More information about the uClibc
mailing list