From 606c7e30ecf9584c735787323470488f028f4a4f Mon Sep 17 00:00:00 2001 From: ruanshudong Date: Mon, 30 Mar 2020 22:27:52 +0800 Subject: [PATCH] fix mac compiler --- NodeServer/NodeImp.cpp | 2 +- tars-client/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NodeServer/NodeImp.cpp b/NodeServer/NodeImp.cpp index 4d0650ff..a27edfaa 100644 --- a/NodeServer/NodeImp.cpp +++ b/NodeServer/NodeImp.cpp @@ -949,7 +949,7 @@ int NodeImp::getNodeLoad(const string& application, const string& serverName, in if (pid > 0) { - memset(buf, 0, sizeof(buf)); +// memset(buf, 0, sizeof(buf)); cmd = "top -b -n 1 -o '%CPU' -o '%MEM' -H -p " + TC_Common::tostr(pid); // FILE* fpTop2 = popen(cmd.c_str(), "r"); // fread(buf, sizeof(char), sizeof(buf)-1, fpTop2); diff --git a/tars-client/CMakeLists.txt b/tars-client/CMakeLists.txt index 2565ea13..95e48205 100644 --- a/tars-client/CMakeLists.txt +++ b/tars-client/CMakeLists.txt @@ -5,6 +5,8 @@ include_directories(${CMAKE_SOURCE_DIR}/tarscpp/servant/protocol) set(MODULE tars-client) +include_directories(.) + aux_source_directory(. DIR_SRC) add_executable(${MODULE} ${DIR_SRC})