--- netcdf-4.6.0/libdispatch/ddispatch.c.orig	2018-01-25 18:31:50.000000000 +0100
+++ netcdf-4.6.0/libdispatch/ddispatch.c	2018-03-16 18:12:05.695639600 +0100
@@ -77,8 +77,8 @@
 	char* p;
 	char* q;
 	char cwd[4096];
-#ifdef _MSC_VER
-        tempdir = getenv("TEMP");
+#ifdef HAVE_WIN_TEMP
+    tempdir = getenv("TEMP");
 #else
 	tempdir = "/tmp";
 #endif
