From c0ee33ad3d6108eb6f7ddaf71bcc22ea7a3f855f 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. --- patches/06-support_64bit_file_sizes.diff | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/06-support_64bit_file_sizes.diff diff --git a/patches/06-support_64bit_file_sizes.diff b/patches/06-support_64bit_file_sizes.diff new file mode 100644 index 0000000..abf1425 --- /dev/null +++ b/patches/06-support_64bit_file_sizes.diff @@ -0,0 +1,13 @@ +--- bzip2-1.0.6.orig/bzip2.c 2010-09-11 00:04:53.000000000 +0100 ++++ bzip2-1.0.6/bzip2.c 2019-05-21 20:40:43.699892600 +0100 +@@ -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) + -- 2.20.1