From 41da38f21afcb5336e4a14490a618bdc64f5cad3 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 31 Jan 2019 12:29:51 +0800 Subject: [PATCH] common/pick_address: add necessary includes * add needed forward declaration * add necessary #includes * move `#include "common/config.h"` to .cc, as it's not part of interface. Signed-off-by: Kefu Chai --- src/common/pick_address.cc | 1 + src/common/pick_address.h | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/pick_address.cc b/src/common/pick_address.cc index d8f261c1529..a009a5b1864 100644 --- a/src/common/pick_address.cc +++ b/src/common/pick_address.cc @@ -17,6 +17,7 @@ #include "include/str_list.h" #include "common/ceph_context.h" #ifndef WITH_SEASTAR +#include "common/config.h" #include "common/config_obs.h" #endif #include "common/debug.h" diff --git a/src/common/pick_address.h b/src/common/pick_address.h index 1f83b71e47f..aa87e7c51eb 100644 --- a/src/common/pick_address.h +++ b/src/common/pick_address.h @@ -3,9 +3,11 @@ #ifndef CEPH_PICK_ADDRESS_H #define CEPH_PICK_ADDRESS_H -#include "common/config.h" +#include +#include class CephContext; +struct entity_addr_t; class entity_addrvec_t; @@ -63,8 +65,7 @@ std::string pick_iface(CephContext *cct, const struct sockaddr_storage &network) * @param ls list of addresses * @param match [out] pointer to match, if an item in @a ls is found configured locally. */ -bool have_local_addr(CephContext *cct, const list& ls, entity_addr_t *match); - +bool have_local_addr(CephContext *cct, const std::list& ls, entity_addr_t *match); const struct sockaddr *find_ip_in_subnet_list( CephContext *cct, -- 2.39.5