mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-12 01:44:54 +00:00
1673041013
It seems bzip2 was abandoned by the author and adopted by the sourceware people. The last release of bzip2 was from 2010. Several security bugs were fixed as well as others. Fixed up PKG_LICENSE to be compatible with SPDX. Changed URLs to point to the new home. Added patch that gets rid of deprecated utime function and switches it to utimensat. Signed-off-by: Rosen Penev <rosenp@gmail.com>
28 lines
719 B
Diff
28 lines
719 B
Diff
--- 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
|
|
}
|