diff --git a/windows/JackTypes_os.h b/windows/JackTypes_os.h index 0da744f7..3a5f4dc4 100644 --- a/windows/JackTypes_os.h +++ b/windows/JackTypes_os.h @@ -21,12 +21,19 @@ #ifndef __JackTypes_WIN32__ #define __JackTypes_WIN32__ +#ifdef __MINGW32__ +#include +#endif #include -typedef ULONGLONG UInt64; +typedef ULONGLONG UInt64; typedef UInt64 uint64_t; typedef unsigned short uint16_t; -typedef DWORD jack_tls_key; +typedef DWORD jack_tls_key; + +#if defined(__MINGW32__) +#define PRIu64 "llu" +#endif #endif diff --git a/windows/JackWinMutex.h b/windows/JackWinMutex.h index acab453d..228513bf 100644 --- a/windows/JackWinMutex.h +++ b/windows/JackWinMutex.h @@ -23,6 +23,9 @@ #include "JackCompilerDeps.h" #include "JackException.h" +#ifdef __MINGW32__ +#include +#endif #include #include @@ -71,13 +74,13 @@ class SERVER_EXPORT JackWinMutex JackWinMutex(const char* name = NULL) { - // In recursive mode by default + // In recursive mode by default if (name) { char buffer[MAX_PATH]; snprintf(buffer, sizeof(buffer), "%s_%s", "JackWinMutex", name); - fMutex = CreateMutex(NULL, FALSE, buffer); - } else { - fMutex = CreateMutex(NULL, FALSE, NULL); + fMutex = CreateMutex(NULL, FALSE, buffer); + } else { + fMutex = CreateMutex(NULL, FALSE, NULL); } ThrowIf((fMutex == 0), JackException("JackWinMutex: could not init the mutex"));