From 9b21b481e0b842afd0ca87277b0adc7d5763e942 Mon Sep 17 00:00:00 2001 From: Mark Abraham Date: Mon, 7 Aug 2017 17:06:32 +0200 Subject: [PATCH] Fix include dependency for getenv Formally, this is required for calling getenv to work, but somehow Jenkins passes it and my macports clang doesn't. That's presumably related to some transitive include of stdlib.h, but in any case we should do this robustly. Change-Id: I27ac743112e03feb14c49e14ead04302b084cf58 --- src/gromacs/hardware/printhardware.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gromacs/hardware/printhardware.cpp b/src/gromacs/hardware/printhardware.cpp index 3aab8536e5..734ade8197 100644 --- a/src/gromacs/hardware/printhardware.cpp +++ b/src/gromacs/hardware/printhardware.cpp @@ -38,6 +38,8 @@ #include "config.h" +#include + #include #include #include @@ -375,7 +377,7 @@ static std::string detected_hardware_string(const gmx_hw_info_t *hwinfo, if (!hwTop.isThisSystem()) { s += gmx::formatString(" NOTE: Hardware topology cached or synthetic, not detected.\n"); - if (char *p = getenv("HWLOC_XMLFILE")) + if (char *p = std::getenv("HWLOC_XMLFILE")) { s += gmx::formatString(" HWLOC_XMLFILE=%s\n", p); } -- 2.11.4.GIT