Bug#379720: vdr-plugin-bitstreamout: FTBFS: error: 'fls' was not declared in this scope

Ben Hutchings ben at decadent.org.uk
Thu Jul 27 00:45:19 UTC 2006


$ gcc -x c -c -o test.o /usr/include/asm/bitops.h
$ gcc -x c++ -c -o test.o /usr/include/asm/bitops.h
/usr/include/asm-generic/bitops/fls64.h: In function 'int fls64(__u64)':
/usr/include/asm-generic/bitops/fls64.h:10: error: 'fls' was not declared in this scope
/usr/include/asm-generic/bitops/fls64.h:11: error: 'fls' was not declared in this scope

Firstly, why is this package using a C++ compiler for what on the face
of it looks like C code?

Secondly, <asm-i486/bitops.h> defines fls() only if __KERNEL__ is
defined but always includes <asm-generic/bitops/fls64.h>, which defines
fls64() in terms of fls().  A C compiler will accept this use of fls()
as an implicit declaration - though the function is never defined - but
a C++ compiler will not.  This seems like a bug in linux-kernel-headers.

Ben.

-- 
Ben Hutchings -- ben at decadentplace.org.uk shortened to ben at decadent.org.uk
If you've signed my GPG key, please send a signature on and to the new uid.
Tomorrow will be cancelled due to lack of interest.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-vdr-dvb-devel/attachments/20060727/20cca178/attachment.pgp


More information about the pkg-vdr-dvb-devel mailing list