diff --git a/paddle/platform/environment.h b/paddle/platform/environment.h index b868de48921914b0c26060b57fea836c6def52d2..9ed765352513d659a78a55b0a54cb09537c16c3b 100644 --- a/paddle/platform/environment.h +++ b/paddle/platform/environment.h @@ -15,13 +15,12 @@ limitations under the License. */ #pragma once #include +#include #include #include "paddle/platform/enforce.h" #include "paddle/string/piece.h" -extern char** environ; - namespace paddle { namespace platform { @@ -46,6 +45,7 @@ inline std::string GetEnvValue(const std::string& name) { } inline std::vector GetAllEnvVariables() { + extern char** environ; std::vector vars; for (auto var = environ; *var != nullptr; ++var) { auto tail = string::Index(*var, "=");