1From 6f21cb4b209d750486ede5472fdf7e35cf5ac3aa Mon Sep 17 00:00:00 2001 2From: Ramin Halavati <[email protected]> 3Date: Wed, 17 May 2023 15:21:43 +0200 4Subject: [PATCH] Add open64 for Large File System support to gzlib. 5 6--- 7 third_party/zlib/gzlib.c | 5 ++++- 8 1 file changed, 4 insertions(+), 1 deletion(-) 9 10diff --git a/third_party/zlib/gzlib.c b/third_party/zlib/gzlib.c 11index 55da46a453fd1..bbdb797e8079d 100644 12--- a/third_party/zlib/gzlib.c 13+++ b/third_party/zlib/gzlib.c 14@@ -7,11 +7,14 @@ 15 16 #if defined(_WIN32) && !defined(__BORLANDC__) 17 # define LSEEK _lseeki64 18+# define OPEN open 19 #else 20 #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 21 # define LSEEK lseek64 22+# define OPEN open64 23 #else 24 # define LSEEK lseek 25+# define OPEN open 26 #endif 27 #endif 28 29@@ -244,7 +247,7 @@ local gzFile gz_open(path, fd, mode) 30 #ifdef WIDECHAR 31 fd == -2 ? _wopen(path, oflag, 0666) : 32 #endif 33- open((const char *)path, oflag, 0666)); 34+ OPEN((const char *)path, oflag, 0666)); 35 if (state->fd == -1) { 36 free(state->path); 37 free(state); 38-- 392.40.1.606.ga4b1b128d6-goog 40 41