X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=datapath%2Flinux-2.6%2Fcompat-2.6%2Finclude%2Flinux%2Frtnetlink.h;h=4d7bd784b588096f75b857600573a60fd1393d2e;hb=02dd3123a0e312f1d33403e744af52dd6096f12d;hp=8bc51560f12c5645b07083be541d44cf4877012a;hpb=064af42167bf4fc9aaea2702d80ce08074b889c0;p=openvswitch diff --git a/datapath/linux-2.6/compat-2.6/include/linux/rtnetlink.h b/datapath/linux-2.6/compat-2.6/include/linux/rtnetlink.h index 8bc51560..4d7bd784 100644 --- a/datapath/linux-2.6/compat-2.6/include/linux/rtnetlink.h +++ b/datapath/linux-2.6/compat-2.6/include/linux/rtnetlink.h @@ -4,7 +4,7 @@ #include_next #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) -static inline int rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, +static inline void rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, u32 group, struct nlmsghdr *nlh, gfp_t flags) { BUG_ON(nlh); /* not implemented */ @@ -12,7 +12,6 @@ static inline int rtnl_notify(struct sk_buff *skb, struct net *net, u32 pid, /* errors reported via destination sk->sk_err */ nlmsg_multicast(rtnl, skb, 0, group); } - return 0; } static inline void rtnl_set_sk_err(struct net *net, u32 group, int error) @@ -20,10 +19,15 @@ static inline void rtnl_set_sk_err(struct net *net, u32 group, int error) netlink_set_err(rtnl, 0, group, error); } #elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,25) +/* No 'net' parameter in these versions. */ #define rtnl_notify(skb, net, pid, group, nlh, flags) \ - ((void) (net), rtnl_notify(skb, pid, group, nlh, flags)) + ((void) (net), (void) rtnl_notify(skb, pid, group, nlh, flags)) #define rtnl_set_sk_err(net, group, error) \ ((void) (net), rtnl_set_sk_err(group, error)) -#endif /* linux kernel < 2.6.25 */ +#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30) +/* Make the return type effectively 'void' to match Linux 2.6.30+. */ +#define rtnl_notify(skb, net, pid, group, nlh, flags) \ + ((void) rtnl_notify(skb, net, pid, group, nlh, flags)) +#endif #endif /* linux/rtnetlink.h wrapper */