From 3ec9ecb162d67b25adb7563381c9e693e3c6f306 Mon Sep 17 00:00:00 2001 From: liaogang Date: Fri, 18 Aug 2017 15:36:57 +0800 Subject: [PATCH] Fix conflicts with new declaration with 'C' linkage --- paddle/platform/environment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/platform/environment.h b/paddle/platform/environment.h index b868de48921..9ed76535251 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, "="); -- GitLab