]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/pick_address: add necessary includes
authorKefu Chai <kchai@redhat.com>
Thu, 31 Jan 2019 04:29:51 +0000 (12:29 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 2 Feb 2019 05:20:00 +0000 (13:20 +0800)
* 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 <kchai@redhat.com>
src/common/pick_address.cc
src/common/pick_address.h

index d8f261c1529e22d782714e6133807c06154b5a53..a009a5b18647b2f809fc80d8fa6dbe611be4a997 100644 (file)
@@ -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"
index 1f83b71e47f94a91c90769f20d252888bf88932e..aa87e7c51eb2d6b5db1a687cc1bf07a961d6a619 100644 (file)
@@ -3,9 +3,11 @@
 #ifndef CEPH_PICK_ADDRESS_H
 #define CEPH_PICK_ADDRESS_H
 
-#include "common/config.h"
+#include <string>
+#include <list>
 
 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<entity_addr_t>& ls, entity_addr_t *match);
-
+bool have_local_addr(CephContext *cct, const std::list<entity_addr_t>& ls, entity_addr_t *match);
 
 const struct sockaddr *find_ip_in_subnet_list(
   CephContext *cct,