<net/if.h> and <linux/if.h> are incompatible
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
Invalid
|
High
|
Unassigned | ||
linux (Ubuntu) |
Fix Released
|
High
|
Andy Whitcroft |
Bug Description
The following minimal test program:
#include <net/if.h>
#include <linux/rtnetlink.h>
int main (int argc, char **argv) { return 0; }
compiled successfully in Ubuntu 10.10, but fails in the in-development Natty series (libc6-dev 2.12.1-0ubuntu8, linux-libc-dev 2.6.37-2.10) as follows:
$ gcc -Wall t.c -o t
In file included from /usr/include/
/usr/
/usr/
/usr/
/usr/
/usr/
/usr/
So far, this problem has bitten busybox, wireless-tools, and NetworkManager.
This was triggered by a change in Linux 2.6.37-rc1 which added '#include <linux/
It's possible to work around this by shuffling includes to avoid using <net/if.h> and only use <linux/if.h> (you typically have to include <sys/socket.h> too), but it's messy and it would be better to steer in the direction of fewer <linux/*> inclusions in userspace applications, not more.
Changed in linux (Ubuntu): | |
assignee: | nobody → Andy Whitcroft (apw) |
Changed in linux (Ubuntu): | |
status: | Confirmed → In Progress |
wpasupplicant is touched by this as well, both in its current version and the 0.7.3 packaging in Debian SVN.