diff options
author | Tony Butler <spudz76@gmail.com> | 2022-11-30 06:19:37 -0800 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-04-18 15:25:21 +0200 |
commit | 36150ff6ffb252ccd4147ffb140d682f58fc19e8 (patch) | |
tree | a3e0c88f97681ca770a1fca806b78f16e1362c96 /tools/bzip2/patches/020-no-utime.patch | |
parent | b691362d1dbe2c07e83c3e703f093dfd8e14145c (diff) | |
download | upstream-36150ff6ffb252ccd4147ffb140d682f58fc19e8.tar.gz upstream-36150ff6ffb252ccd4147ffb140d682f58fc19e8.tar.bz2 upstream-36150ff6ffb252ccd4147ffb140d682f58fc19e8.zip |
tools/bzip2: add `bzip2` binaries
`bzip2` is the standard executable for bzip2 compression
this includes development includes and both static and shared libs
(libbz2) which can be used by other packages
the initramfs generator offers the BZIP2 option but there was no
executable to support it, and worked only via side effect of having a
system-installed version of bzip2, which could be less predictable
Signed-off-by: Tony Butler <spudz76@gmail.com>
[ remove unintended change ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'tools/bzip2/patches/020-no-utime.patch')
-rw-r--r-- | tools/bzip2/patches/020-no-utime.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/bzip2/patches/020-no-utime.patch b/tools/bzip2/patches/020-no-utime.patch new file mode 100644 index 0000000000..d0cd4f0e35 --- /dev/null +++ b/tools/bzip2/patches/020-no-utime.patch @@ -0,0 +1,27 @@ +--- a/bzip2.c ++++ b/bzip2.c +@@ -69,7 +69,6 @@ + #if BZ_UNIX + # include <fcntl.h> + # include <sys/types.h> +-# include <utime.h> + # include <unistd.h> + # include <sys/stat.h> + # include <sys/times.h> +@@ -1051,12 +1050,12 @@ void applySavedTimeInfoToOutputFile ( Ch + { + # if BZ_UNIX + IntNative retVal; +- struct utimbuf uTimBuf; ++ struct timespec uTimBuf[2] = {}; + +- uTimBuf.actime = fileMetaInfo.st_atime; +- uTimBuf.modtime = fileMetaInfo.st_mtime; ++ uTimBuf[0].tv_sec = fileMetaInfo.st_atime; ++ uTimBuf[1].tv_sec = fileMetaInfo.st_mtime; + +- retVal = utime ( dstName, &uTimBuf ); ++ retVal = utimensat ( AT_FDCWD, dstName, uTimBuf , 0 ); + ERROR_IF_NOT_ZERO ( retVal ); + # endif + } |