On Sun, Aug 13, 2017 at 10:22:19AM +0800, JingPiao Chen wrote:
> * rtnl_addr.c: New file.
> * Makefile.am (strace_SOURCES): Add it.
> * configure.ac (AC_CHECK_HEADERS): Add linux/if_addr.h.
> * netlink_route.h (decode_ifaddrmsg): New prototype.
> * netlink_route.c (route_decoders): Add RTM_DELADDR,
> RTM_GETADDR, RTM_GETANYCAST, RTM_GETMULTICAST add RTM_NEWADDR.
> * xlat/ifaddrflags.in: New file.
> * xlat/routing_scopes.in: Likewise.
[...]
> +#include "defs.h"
> +#include "netlink_route.h"
> +#include "print_fields.h"
> +
> +#ifdef HAVE_LINUX_IF_ADDR_H
> +# include <linux/if_addr.h>
> +#endif
> +
> +#include "xlat/ifaddrflags.h"
> +#include "xlat/routing_scopes.h"
> +
> +DECL_NETLINK_ROUTE_DECODER(decode_ifaddrmsg)
> +{
> +     struct ifaddrmsg ifaddr = { .ifa_family = family };

struct ifaddrmsg used to be defined in <linux/rtnetlink.h>.
If <linux/if_addr.h> is not available, then <linux/rtnetlink.h> has to be
used instead, otherwise the code won't compile on older systems.


-- 
ldv

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to