[PATCH]Remove unneeded header inclusion

Nicolas CARRIER nicolas.carrier.ext at parrot.com
Mon Apr 23 09:57:00 EDT 2012


By digging in the mailing list archive, I found that I erroneously posted a patch into a non-related discussion.
Hence I start a new thread to give it more visibility.
Please forgive me for the inconvenience,

Here comes the original message :

Hello,
When using libnl, one can't include both netlink/route/link.h and net/if.h because it leads to structure redefinitions :
    ...
    /usr/include/linux/if.h:137:8: error: redefinition of 'struct ifmap'
    /usr/include/net/if.h:112:8: note: originally defined here
    ...

The attached patch removes the unneeded linux/if.h inclusion from netlink/route/link.h and fixed the problem for me.
It should apply to the current master's HEAD.

Note that I'm no libnl specialist and hence not sure this is the right way to achieve it...

Regards

-- 
Nicolas CARRIER - Software Engineer - Parrot France
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-don-t-include-linux-if.h-which-conflicts-with-net-if.patch
Type: text/x-diff
Size: 661 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20120423/44a1c75f/attachment.bin>


More information about the libnl mailing list