From 4c437e18561f5f45dd65a53f1d17b4c615d1758a Mon Sep 17 00:00:00 2001 From: JingPiao Chen Date: Fri, 16 Jun 2017 20:58:38 +0800 Subject: [PATCH] Move nl_route_types definition from netlink.c to netlink_route.c The side effect of #include "xlat/nl_route_types.h" is RTM_* constants properly defined in that header file. While netlink.c does not use these constants itself, netlink_route.c is going to need them soon. * defs.h (nl_route_types): New xlat prototype. * netlink.c: Move inclusion of "xlat/nl_route_types.h" ... * netlink_route.c: ... here. --- defs.h | 1 + netlink.c | 1 - netlink_route.c | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/defs.h b/defs.h index 44a6296e..5b09f2e3 100644 --- a/defs.h +++ b/defs.h @@ -292,6 +292,7 @@ extern const struct xlat evdev_abs[]; extern const struct xlat inet_protocols[]; extern const struct xlat msg_flags[]; extern const struct xlat netlink_protocols[]; +extern const struct xlat nl_route_types[]; extern const struct xlat open_access_modes[]; extern const struct xlat open_mode_flags[]; extern const struct xlat resource_flags[]; diff --git a/netlink.c b/netlink.c index 2a0353fd..ab40b142 100644 --- a/netlink.c +++ b/netlink.c @@ -43,7 +43,6 @@ #include "xlat/nl_crypto_types.h" #include "xlat/nl_netfilter_msg_types.h" #include "xlat/nl_netfilter_subsys_ids.h" -#include "xlat/nl_route_types.h" #include "xlat/nl_selinux_types.h" #include "xlat/nl_sock_diag_types.h" #include "xlat/nl_xfrm_types.h" diff --git a/netlink_route.c b/netlink_route.c index 2e7faa4c..dc5a13f4 100644 --- a/netlink_route.c +++ b/netlink_route.c @@ -30,6 +30,8 @@ #include "defs.h" #include "netlink.h" +#include "xlat/nl_route_types.h" + static void decode_family(struct tcb *const tcp, const uint8_t family, const kernel_ulong_t addr, const unsigned int len) -- 2.40.0