[Bf-blender-cvs] [241ac506842] experimental-build: Attempt to fix windowz building due to missing ssize_t type, take III.

Bastien Montagne noreply at git.blender.org
Sun Sep 20 19:26:25 CEST 2020


Commit: 241ac50684249056bbc8ca6db7f4f11342174807
Author: Bastien Montagne
Date:   Sun Sep 20 19:25:54 2020 +0200
Branches: experimental-build
https://developer.blender.org/rB241ac50684249056bbc8ca6db7f4f11342174807

Attempt to fix windowz building due to missing ssize_t type, take III.

===================================================================

M	source/blender/blenloader/intern/readfile.h
M	source/blender/blenloader/intern/undofile.c

===================================================================

diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h
index c88cab7ded8..d43f7ded50e 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -24,7 +24,9 @@
 
 #pragma once
 
-#include "BLI_winstuff.h"
+#ifdef WIN32
+#  include "BLI_winstuff.h"
+#endif
 
 #include "DNA_sdna_types.h"
 #include "DNA_space_types.h"
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 4da73138c38..92aec13ecf1 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -252,7 +252,11 @@ bool BLO_memfile_write_file(struct MemFile *memfile, const char *filename)
   }
 
   for (chunk = memfile->chunks.first; chunk; chunk = chunk->next) {
+#ifdef _WIN32
+    if ((size_t)write(file, chunk->buf, (uint)chunk->size) != chunk->size) {
+#else
     if ((size_t)write(file, chunk->buf, chunk->size) != chunk->size) {
+#endif
       break;
     }
   }



More information about the Bf-blender-cvs mailing list