Fix MingW build
[alexxy/gromacs.git] / src / gromacs / gmxlib / main.cpp
index 253e69ce31dcbc604e5d58dc67c544f0523198a8..a80087c754960a602012653bd6b7db5b0396514c 100644 (file)
@@ -229,7 +229,7 @@ int gmx_gethostname(char *name, size_t len)
     {
         gmx_incons("gmx_gethostname called with len<8");
     }
-#if defined(HAVE_UNISTD_H) && !defined(__native_client__)
+#if defined(HAVE_UNISTD_H) && !defined(__native_client__) && !defined(__MINGW32__)
     if (gethostname(name, len-1) != 0)
     {
         strncpy(name, "unknown", 8);