summaryrefslogtreecommitdiffstats
path: root/core/os/rw_lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/rw_lock.h')
-rw-r--r--core/os/rw_lock.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/os/rw_lock.h b/core/os/rw_lock.h
index a232fcb1ce..e5bb6aec2b 100644
--- a/core/os/rw_lock.h
+++ b/core/os/rw_lock.h
@@ -33,10 +33,17 @@
#include "core/typedefs.h"
+#ifdef MINGW_ENABLED
+#define MINGW_STDTHREAD_REDUNDANCY_WARNING
+#include "thirdparty/mingw-std-threads/mingw.shared_mutex.h"
+#define THREADING_NAMESPACE mingw_stdthread
+#else
#include <shared_mutex>
+#define THREADING_NAMESPACE std
+#endif
class RWLock {
- mutable std::shared_timed_mutex mutex;
+ mutable THREADING_NAMESPACE::shared_timed_mutex mutex;
public:
// Lock the RWLock, block if locked by someone else.