Skip to content

Commit

Permalink
Fix undefined reference
Browse files Browse the repository at this point in the history
  • Loading branch information
gangliao committed Aug 18, 2017
1 parent 3ec9ecb commit 83d0016
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddle/platform/environment.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ limitations under the License. */
#include "paddle/platform/enforce.h"
#include "paddle/string/piece.h"

extern char** environ; // for environment variables

namespace paddle {
namespace platform {

Expand All @@ -45,7 +47,6 @@ inline std::string GetEnvValue(const std::string& name) {
}

inline std::vector<std::string> GetAllEnvVariables() {
extern char** environ;
std::vector<std::string> vars;
for (auto var = environ; *var != nullptr; ++var) {
auto tail = string::Index(*var, "=");
Expand Down

0 comments on commit 83d0016

Please sign in to comment.