summaryrefslogtreecommitdiffstats
path: root/src/util/win32/mingw-compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/win32/mingw-compat.h')
-rw-r--r--src/util/win32/mingw-compat.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/util/win32/mingw-compat.h b/src/util/win32/mingw-compat.h
new file mode 100644
index 0000000..aa2bef9
--- /dev/null
+++ b/src/util/win32/mingw-compat.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) the libgit2 contributors. All rights reserved.
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+#ifndef INCLUDE_win32_mingw_compat_h__
+#define INCLUDE_win32_mingw_compat_h__
+
+#if defined(__MINGW32__)
+
+#undef stat
+
+#if _WIN32_WINNT < 0x0600 && !defined(__MINGW64_VERSION_MAJOR)
+#undef MemoryBarrier
+void __mingworg_MemoryBarrier(void);
+#define MemoryBarrier __mingworg_MemoryBarrier
+#define VOLUME_NAME_DOS 0x0
+#endif
+
+#endif
+
+#endif