wireless.h compilation issue (__user)

From: Vadim Abrossimov <Vadim_Abrossimov.a.t.yahoo.com>
Date: Mon Aug 30 2004 - 01:46:07 EDT

Hello,

[I've post this message on oe@@handhelds.org but it still have not appeared on
the list. Since there is a related discussion/questions on this list I copy my
mail here as well..]

I've just checked out OE sources and built opie and gpe rootfs images.
I got a compilation error in the wireless.h header file compiling
wireless-tools:

/home/dima/linux/handheld/oe/build-arm/tmp/cross/lib/gcc/arm-linux/3.4.1/../../../../arm-linux/include/linux/wireless.h:441: error: variable or field `__user' declared void

__user is a macro defined in the kernel linux/compiler.h to tag user
addresses to allow compile-time checks that those addresses are not
dereferenced from the kernel space. It happens that:
- wireless.h doesn't include compiler.h explicitly. When compiled in the
kernel environment compiler.h is included via another header but
compiler.h is not included at all when compiled in the context of libc
headers (linux-libc-headers-2.6.7.0-r2)
- in addition the libc headers provide an empty compiler.h header file

To solve the issue I included compiler.h explicitly in wireless.h and
defined __user to nothing in compiler.h. Alternatively, it would be
possible to symb-link the libc's comiler.h to the kernel's compiler.h as
it's already done for wireless.h (see
oe/packages/linux-libc-headers/linux-libc-headers_2.6.7.0.oe)

Since it's the first time I'm touching oe as well as a handheld linux
distribution I would like to know have I missed something?
Also if it's a bug to which category should I submit it?

Then I reached the issue described in my previous posting:
how can I build an initrd?
http://www.handhelds.org/hypermail/h2200-port/current/1616.html

Vadim
Received on Mon Aug 30 01:44:30 2004

This archive was generated by hypermail 2.1.8 : Mon Aug 30 2004 - 01:44:48 EDT