getdents: Fix mips64 build
getdents: Fix mips64 build

On Wed, 27 Jan 2010 07:14:08 +0100, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
> 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.

Thanks, indeed.  If we came into "#elif WORDSIZE == 32" block, above
condition never be true.  So we can just move this statement out of
"#if...#elif...#elif...#endif" block.  Here is a revised patch.

------------------------------------------------------
From: Atsushi Nemoto <80aeab2fcc576fb9134b563f36af765199d49e90@mba.ocn.ne.jp>
Subject: [PATCH] getdents: Fix mips64 build

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 <80aeab2fcc576fb9134b563f36af765199d49e90@mba.ocn.ne.jp>
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>

skristiansson/uClibc-or1k,hjl-tools/uClibc,kraj/uClibc,groundwater/uClibc,kraj/uclibc-ng,skristiansson/uClibc-or1k,groundwater/uClibc,kraj/uClibc,brgl/uclibc-ng,brgl/uclibc-ng,wbx-github/uclibc-ng,majek/uclibc-vx32,mephi42/uClibc,OpenInkpot-archive/iplinux-uclibc,ysat0/uClibc,ysat0/uClibc,m-labs/uclibc-lm32,ndmsystems/uClibc,majek/uclibc-vx32,ndmsystems/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,hwoarang/uClibc,czankel/xtensa-uclibc,kraj/uclibc-ng,m-labs/uclibc-lm32,OpenInkpot-archive/iplinux-uclibc,hjl-tools/uClibc,ffainelli/uClibc,foss-xtensa/uClibc,brgl/uclibc-ng,hjl-tools/uClibc,mephi42/uClibc,ffainelli/uClibc,ddcc/klee-uclibc-0.9.33.2,hjl-tools/uClibc,waweber/uclibc-clang,waweber/uclibc-clang,ddcc/klee-uclibc-0.9.33.2,foss-xtensa/uClibc,OpenInkpot-archive/iplinux-uclibc,atgreen/uClibc-moxie,atgreen/uClibc-moxie,m-labs/uclibc-lm32,ysat0/uClibc,groundwater/uClibc,skristiansson/uClibc-or1k,wbx-github/uclibc-ng,mephi42/uClibc,ffainelli/uClibc,mephi42/uClibc,kraj/uclibc-ng,czankel/xtensa-uclibc,kraj/uclibc-ng,hwoarang/uClibc,foss-for-synopsys-dwc-arc-processors/uClibc,wbx-github/uclibc-ng,ysat0/uClibc,foss-xtensa/uClibc,OpenInkpot-archive/iplinux-uclibc,ddcc/klee-uclibc-0.9.33.2,majek/uclibc-vx32,foss-xtensa/uClibc,groundwater/uClibc,atgreen/uClibc-moxie,majek/uclibc-vx32,wbx-github/uclibc-ng,czankel/xtensa-uclibc,m-labs/uclibc-lm32,foss-for-synopsys-dwc-arc-processors/uClibc,waweber/uclibc-clang,skristiansson/uClibc-or1k,hwoarang/uClibc,kraj/uClibc,brgl/uclibc-ng,waweber/uclibc-clang,foss-for-synopsys-dwc-arc-processors/uClibc,ddcc/klee-uclibc-0.9.33.2,hwoarang/uClibc,czankel/xtensa-uclibc,ndmsystems/uClibc,ffainelli/uClibc,groundwater/uClibc,ffainelli/uClibc,kraj/uClibc,atgreen/uClibc-moxie,ndmsystems/uClibc,hjl-tools/uClibc