diff --git a/lib/filesys.cpp b/lib/filesys.cpp index 6535a80433..8dd1967c0a 100644 --- a/lib/filesys.cpp +++ b/lib/filesys.cpp @@ -26,7 +26,7 @@ #include #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__MINGW32__) #define getcwd _getcwd #endif diff --git a/lib/parse.cpp b/lib/parse.cpp index a79365e232..24a983794c 100644 --- a/lib/parse.cpp +++ b/lib/parse.cpp @@ -39,7 +39,7 @@ #endif #endif -#ifdef _MSC_VER +#if !defined(HAVE_STRDUP) && defined(HAVE__STRDUP) #define strdup _strdup #endif