undefined reference to `__ffs'

Nicolas Pitre nico at cam.org
Mon Aug 30 14:53:01 EDT 2004


On Mon, 30 Aug 2004, Josh Boyer wrote:

> On Mon, 2004-08-30 at 13:20, Brian T wrote:
>> Not sure how to fix it for non-x86 then.  Point me in the right direction?
>
> Welcome to the hell that is compatmac.h ;).
>
> Seriously though, maybe take a look at generic_ffs() in
> include/linux/bitops.h (in the 2.6 kernel).

Again, ffs()/generic_ffs() are not equivalent to __ffs().

For a generic solution to add to compatmac.h, just use:

#define __ffs(x) (ffs(x) - 1)


Nicolas




More information about the linux-mtd mailing list