Compilation issue with libnl
Thomas Graf
tgraf at suug.ch
Tue Jul 3 17:13:40 CEST 2007
* Helmut Schaa <hschaa at suse.de> 2007-07-03 15:52
> A simple main.cpp with "netlink/netlink.h" included compiles without issues
> but I have problems compiling a program which
> includes "netlink/route/link.h". Is this related to the headers issue you
> mentioned?
>
> Here is the error I get when compiling main.cpp with "netlink/route/link.h"
> included:
>
> In file included from /usr/include/netlink/msg.h:17,
> from /usr/include/netlink/cache.h:16,
> from /usr/include/netlink/route/link.h:16,
> from main.cpp:2:
> /usr/include/netlink/attr.h:30: error: redefinition of ???struct nlattr???
> /usr/include/linux/netlink.h:127: error: previous definition of ???struct
> nlattr???
Yes, this is exactly the problem I mentioned. Some distributions seem to
modify linux/netlink.h and move the __KERNEL__ ifdef up to avoid
declarding struct nlattr so I've added it to netlink/attr.h which
causes problems when compiling against the kernel header file.
More information about the kde-networkmanager
mailing list