From: Kefu Chai Date: Thu, 31 Jan 2019 04:29:51 +0000 (+0800) Subject: common/pick_address: add necessary includes X-Git-Tag: v14.1.0~225^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=41da38f21afcb5336e4a14490a618bdc64f5cad3;p=ceph.git 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 --- diff --git a/src/common/pick_address.cc b/src/common/pick_address.cc index d8f261c1529e..a009a5b18647 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 1f83b71e47f9..aa87e7c51eb2 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,