netlink: Make netlink-protocol.h compatible with <linux/netlink.h>.
authorBen Pfaff <blp@nicira.com>
Tue, 7 Dec 2010 17:33:27 +0000 (09:33 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 10 Dec 2010 19:12:53 +0000 (11:12 -0800)
commit365a25176bf854112b37c56888979d7755ab0d72
treea8c0578c955e4a64e97f27c5459cb7c96721ba06
parentd774cadf7b661f099687049a0c4a7c1a3b679987
netlink: Make netlink-protocol.h compatible with <linux/netlink.h>.

Until now, netlink-protocol.h and <linux/netlink.h> could not both be
included by a single source file, because they contained conflicting
definitions.  This commit fixes the problem, by having netlink-protocol.h
delegate to <linux/netlink.h> where it is available.

Here's an example of the problem: odp-util.c includes both
datapath-protocol.h and will need netlink-protocol.h also so that it can
look through actions defined as struct nlattr.  datapath-protocol.h
includes <linux/if_link.h> for the definition of rtnl_link_stats64, and
<linux/if_link.h> includes <linux/netlink.h>.

Acked-by: Jesse Gross <jesse@nicira.com>
lib/netlink-protocol.h