]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - ansi.c
Make it compile with mingw32 again
[xonotic/gmqcc.git] / ansi.c
diff --git a/ansi.c b/ansi.c
index 52399df78ca538a156e99eeb03dc087899e3bc74..e69e9e835aa468d235eb78876e93abb8374bc75d 100644 (file)
--- a/ansi.c
+++ b/ansi.c
@@ -157,7 +157,16 @@ long platform_ftell(FILE *stream) {
 }
 
 int platform_mkdir(const char *path, int mode) {
+    /*
+     * For some reason mingw32 just doesn't have a correct mkdir impl
+     * so we handle that here.
+     */
+#   ifdef _WIN32
+    (void)mode;
+    return mkdir(path);
+#   else
     return mkdir(path, mode);
+#   endif /*!_WIN32*/
 }
 
 DIR *platform_opendir(const char *path) {