From: Sage Weil Date: Mon, 19 Feb 2018 15:00:24 +0000 (-0600) Subject: mon/ConfigMonitor: add missing #include, tweak types X-Git-Tag: v13.0.2~78^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3d0b38aff5df819279cff4e0b070767a1af9789a;p=ceph.git mon/ConfigMonitor: add missing #include, tweak types Seems to resolve a build error on some compilers! Meh. Signed-off-by: Sage Weil --- diff --git a/src/messages/MMonCommand.h b/src/messages/MMonCommand.h index a0b263c8d49f..2f58343107fe 100644 --- a/src/messages/MMonCommand.h +++ b/src/messages/MMonCommand.h @@ -18,12 +18,12 @@ #include "messages/PaxosServiceMessage.h" #include -using std::vector; +#include class MMonCommand : public PaxosServiceMessage { public: uuid_d fsid; - vector cmd; + std::vector cmd; MMonCommand() : PaxosServiceMessage(MSG_MON_COMMAND, 0) {} MMonCommand(const uuid_d &f) diff --git a/src/mon/ConfigMonitor.cc b/src/mon/ConfigMonitor.cc index 5a260ab571df..a79149ab1bfe 100644 --- a/src/mon/ConfigMonitor.cc +++ b/src/mon/ConfigMonitor.cc @@ -9,6 +9,7 @@ #include "messages/MMonCommand.h" #include "common/Formatter.h" #include "common/TextTable.h" +#include "common/cmdparse.h" #include "include/stringify.h" #define dout_subsys ceph_subsys_mon @@ -105,10 +106,10 @@ static string indent_who(const string& who) bool ConfigMonitor::preprocess_command(MonOpRequestRef op) { MMonCommand *m = static_cast(op->get_req()); - stringstream ss; + std::stringstream ss; int err = 0; - map cmdmap; + cmdmap_t cmdmap; if (!cmdmap_from_json(m->cmd, &cmdmap, ss)) { string rs = ss.str(); mon->reply_command(op, -EINVAL, rs, get_last_committed()); @@ -327,10 +328,10 @@ bool ConfigMonitor::prepare_update(MonOpRequestRef op) bool ConfigMonitor::prepare_command(MonOpRequestRef op) { MMonCommand *m = static_cast(op->get_req()); - stringstream ss; + std::stringstream ss; int err = -EINVAL; - map cmdmap; + cmdmap_t cmdmap; if (!cmdmap_from_json(m->cmd, &cmdmap, ss)) { string rs = ss.str(); mon->reply_command(op, -EINVAL, rs, get_last_committed());