Looks good.

Ethan

On Tue, Sep 6, 2011 at 09:34, Ben Pfaff <[email protected]> wrote:
> One of the current goals of netlink-protocol.h, for better or for worse, is
> to ensure that the same definitions are available whether a Linux kernel is
> in use or not.  One of the ways it accomplishes this is by putting the
> conditional definitions that test for features missing in old kernels at
> the very end, after the dummy definitions used on non-Linux platforms.
> However, commit b0025c8389f "netlink-protocol: Define missing symbols"
> added new conditional definitions only in the Linux platform case, which
> means that those definitions won't be available on non-Linux platforms.
> This commit moves them to the end, instead.
>
> The symbols that are moved are only used from netlink-socket.c, which is
> only built on Linux platforms, so this does not change an actual bug.  It
> only makes the location of the definitions consistent with prior practice.
> ---
>  lib/netlink-protocol.h |   36 ++++++++++++++++++------------------
>  1 files changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h
> index 64f773e..521c5bf 100644
> --- a/lib/netlink-protocol.h
> +++ b/lib/netlink-protocol.h
> @@ -37,24 +37,6 @@
>  #include <linux/netlink.h>
>  #include <linux/genetlink.h>
>
> -/* Some Xenddks have an outdated genetlink header file which doesn't have 
> some
> - * symbols it should. */
> -#ifndef CTRL_ATTR_MCAST_GRP_MAX
> -
> -#undef CTRL_ATTR_MAX
> -#define CTRL_ATTR_MAX 7
> -#define CTRL_ATTR_MCAST_GROUPS 7
> -
> -enum {
> -       CTRL_ATTR_MCAST_GRP_UNSPEC,
> -       CTRL_ATTR_MCAST_GRP_NAME,
> -       CTRL_ATTR_MCAST_GRP_ID,
> -       __CTRL_ATTR_MCAST_GRP_MAX,
> -};
> -
> -#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
> -#endif /* CTRL_ATTR_MCAST_GRP_MAX */
> -
>  #else
>  #define NETLINK_GENERIC         16
>
> @@ -179,4 +161,22 @@ enum {
>  #define NETLINK_DROP_MEMBERSHIP 2
>  #endif
>
> +/* These were introduced all together in 2.6.23.  (We want our programs to
> + * support the newer kernel features even if compiled with older headers.) */
> +#ifndef CTRL_ATTR_MCAST_GRP_MAX
> +
> +#undef CTRL_ATTR_MAX
> +#define CTRL_ATTR_MAX 7
> +#define CTRL_ATTR_MCAST_GROUPS 7
> +
> +enum {
> +       CTRL_ATTR_MCAST_GRP_UNSPEC,
> +       CTRL_ATTR_MCAST_GRP_NAME,
> +       CTRL_ATTR_MCAST_GRP_ID,
> +       __CTRL_ATTR_MCAST_GRP_MAX,
> +};
> +
> +#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
> +#endif /* CTRL_ATTR_MCAST_GRP_MAX */
> +
>  #endif /* netlink-protocol.h */
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> [email protected]
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to