diff --git a/src/Daemon/BaseDaemon.cpp b/src/Daemon/BaseDaemon.cpp index 8833156386f..d66bdf3583f 100644 --- a/src/Daemon/BaseDaemon.cpp +++ b/src/Daemon/BaseDaemon.cpp @@ -967,7 +967,7 @@ static void blockSignals(const std::vector & signals) throw Poco::Exception("Cannot block signal."); } -extern String getGitHash(); +extern const char * GIT_HASH; void BaseDaemon::initializeTerminationAndSignalProcessing() { @@ -1007,7 +1007,7 @@ void BaseDaemon::initializeTerminationAndSignalProcessing() build_id = ""; #endif - git_hash = getGitHash(); + git_hash = GIT_HASH; #if defined(OS_LINUX) std::string executable_path = getExecutablePath(); diff --git a/src/Daemon/GitHash.cpp.in b/src/Daemon/GitHash.cpp.in index 7e33682d670..c5990531449 100644 --- a/src/Daemon/GitHash.cpp.in +++ b/src/Daemon/GitHash.cpp.in @@ -1,8 +1,3 @@ /// This file was autogenerated by CMake -#include - -String getGitHash() -{ - return "@GIT_HASH@"; -} +const char * GIT_HASH = "@GIT_HASH@";