From 875a8a6c79b0c5da1715b70eaa58b12f9b816767 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Mon, 31 May 2021 10:06:38 -0700 Subject: Cleanup: Replace fseek() calls with BLI_fseek() The fseek() function on Windows only accepts a 32-bit long offset argument. Because of this we have our own version, BLI_fseek(), which will use 64-bit _fseeki64() on Windows. This patch just replaces some fseek() calls with BLI_fseek(). Differential Revision: https://developer.blender.org/D11430 Reviewed by Brecht Van Lommel --- source/blender/blenlib/intern/fileops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 106bd5bc793..107c27da6a2 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -171,7 +171,7 @@ size_t BLI_gzip_mem_to_file_at_pos( z_stream strm; unsigned char out[CHUNK]; - fseek(file, gz_stream_offset, 0); + BLI_fseek(file, gz_stream_offset, 0); strm.zalloc = Z_NULL; strm.zfree = Z_NULL; @@ -217,7 +217,7 @@ size_t BLI_ungzip_file_to_mem_at_pos(void *buf, size_t len, FILE *file, size_t g size_t chunk = 256 * 1024; unsigned char in[CHUNK]; - fseek(file, gz_stream_offset, 0); + BLI_fseek(file, gz_stream_offset, 0); strm.zalloc = Z_NULL; strm.zfree = Z_NULL; -- cgit v1.2.3