diff options
author | Bastien Montagne <bastien@blender.org> | 2020-09-20 20:34:12 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-09-20 20:34:12 +0300 |
commit | 0d5aa352d37dc496a07b88d993939c49bcbe8b1d (patch) | |
tree | f5f80e339045cdc5fa20cfb8939998b7d127e9cb /source/blender/blenloader | |
parent | cdad684ada84b50d7dcb3f5869384a886a408590 (diff) |
Fix broken Windows buiilds after own recent commit in read/write code.
Usual issue of win32 not following POSIX standards.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.h | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/undofile.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h index c479e3e589b..d43f7ded50e 100644 --- a/source/blender/blenloader/intern/readfile.h +++ b/source/blender/blenloader/intern/readfile.h @@ -24,6 +24,10 @@ #pragma once +#ifdef WIN32 +# include "BLI_winstuff.h" +#endif + #include "DNA_sdna_types.h" #include "DNA_space_types.h" #include "DNA_windowmanager_types.h" /* for ReportType */ 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; } } |