From 19ad365834ca2fb550419bba4308c4eade4d1a0c Mon Sep 17 00:00:00 2001 From: amd-lthakur <46560939+amd-lthakur@users.noreply.github.com> Date: Fri, 9 Aug 2019 17:23:16 +0530 Subject: [PATCH] [dtests] Fix build issues with hipMemoryAllocateCoherentDriver.cpp on windows (#1309) Compilation error being observed due to popen(), pclose() and setenv() linux calls on windows. Replaced with appropriate calls on windows. --- .../runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp b/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp index f2f1e49c33..a064a6ad0a 100644 --- a/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp +++ b/hipamd/tests/src/runtimeApi/memory/hipMemoryAllocateCoherentDriver.cpp @@ -29,6 +29,13 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include #include #include "hip/hip_runtime.h" + +#ifdef _WIN64 +#define popen(x,y) _popen(x,y) +#define pclose(x) _pclose(x) +#define setenv(x,y,z) _putenv_s(x,y) +#endif + using namespace std; string getRes() {