[linux-dvb] [BUG] usage of undefined macros in dvb header files
Manu Abraham
manu at kromtek.com
Thu Mar 10 14:48:55 CET 2005
Johannes Stezenbach wrote:
> Nico Sabbi wrote:
>
>>on kernels that don't have __iomem and __iouser defined,
>>especially distributions with patched kernel headers that have funny
>>version names
>>like 2.6.8.1-mdkcustom, compilation of dvb drivers (and applications
>>that use them)
>>_always_ fails because those macros are required by dvb header files.
>>
>>I understand that this bug is related to the kernel rather than to dvb,
>>and I guess that the check to define these macros as empty for older
>>kernels is done badly, still dvb drivers and applications are affected,
>>so I hope someone of you developers will find a definitive fix to this
>>never
>>ending problem.
>
>
> The problem is actually that the includes that come with glibc
> are out of date. On a recent distribution you have DVB includes
> in /usr/include/linux/dvb/ and a /usr/include/linux/compiler.h
> that defines __user. When you mess with the files in
> /usr/include/linux/dvb/, or you use -I.../dvb-kernel/include
> then it's your fault if you don't supply a matching __user
> definition (-D__user).
>
> I don't know if the policy has changed, but AFAIK Linus does
> not like userspace compatibility cruft in kernel includes,
> i.e. he does (did?) not accept patches with #ifdef __KERNEL
> cruft in it. (There's a separate project to get around that:
> http://ep09.pld-linux.org/~mmazur/linux-libc-headers/
> http://groups-beta.google.com/group/linux.kernel/msg/80186432c7d76bd6).
>
> Likely I guess he would not like
> #if !defined(__user)
> #define __user
> #endif
> repeated in all DVB API headers.
>
> But of course I see the problem with backwards compatibility.
> The only way to solve it cleanly would be to have a "dvb-dev"
> package that installs compatible API headers in /usr/include/dvb/.
> (Or you add a cleaned copy of the API headers to your source tree
> (like xawtv does it with v4l headers).)
> I don't like both ;-/
>
A symlink would be a better idea ? It works good for me.
I have 2 symlinks that solves the problem,
/usr/include/dvb --> /work/dvb-kernel --> dvb-kernel/cvs-by date
Everytime i update the dvb-kernel cvs, i have to change the second
symbolic link, and everytime i update the kernel source i change the
first symlink..
Manu
More information about the linux-dvb
mailing list