From 13d8bce0393ca21cbca1e8ba7692466a64fd46dd Mon Sep 17 00:00:00 2001 From: Phil Ross Date: Tue, 21 May 2019 20:46:14 +0100 Subject: [PATCH] Fix a 'not a normal file' error when compressing large files. The bzip2 command line would report 'not a normal file' for files of size larger than 2^32 - 1 bytes. Patch bzip2.c to use _stati64 instead of _stat so that a successful result is returned for large files. Resolves https://github.com/philr/bzip2-windows/issues/3. --- bzip2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bzip2.c b/bzip2.c index be3b3be..76c6c94 100644 --- a/bzip2.c +++ b/bzip2.c @@ -132,8 +132,8 @@ # define NORETURN /**/ # define PATH_SEP '\\' -# define MY_LSTAT _stat -# define MY_STAT _stat +# define MY_LSTAT _stati64 +# define MY_STAT _stati64 # define MY_S_ISREG(x) ((x) & _S_IFREG) # define MY_S_ISDIR(x) ((x) & _S_IFDIR) -- 1.8.3.1