From 99ad4f5c59f520743bb3a171adc02f1093175851 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Thu, 10 Apr 2025 23:43:51 +0800 Subject: p7zip: fix build with clang --- repos/extra/p7zip/.checksum | 1 + repos/extra/p7zip/abuild | 3 ++- repos/extra/p7zip/fix-uintxx_t-redefined.patch | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 repos/extra/p7zip/fix-uintxx_t-redefined.patch diff --git a/repos/extra/p7zip/.checksum b/repos/extra/p7zip/.checksum index ebd9eb11..09aa4e3c 100644 --- a/repos/extra/p7zip/.checksum +++ b/repos/extra/p7zip/.checksum @@ -1 +1,2 @@ +baca2c2259e5f18b33e92aa0ad05e7f201a69e1360bc95d0e6405447df417b83 fix-uintxx_t-redefined.patch 650225789fbf2c33981dcbfa11fd6e880b714eca9b4934e24fcf6dd49a3df3b8 p7zip-17.06.tar.gz diff --git a/repos/extra/p7zip/abuild b/repos/extra/p7zip/abuild index 20f63583..3cb5cdef 100644 --- a/repos/extra/p7zip/abuild +++ b/repos/extra/p7zip/abuild @@ -1,7 +1,8 @@ name=p7zip version=17.06 release=1 -source="https://github.com/$name-project/$name/archive/v$version/$name-$version.tar.gz" +source="https://github.com/$name-project/$name/archive/v$version/$name-$version.tar.gz + fix-uintxx_t-redefined.patch" build() { sed '/^gzip/d' -i install.sh diff --git a/repos/extra/p7zip/fix-uintxx_t-redefined.patch b/repos/extra/p7zip/fix-uintxx_t-redefined.patch new file mode 100644 index 00000000..d5d802da --- /dev/null +++ b/repos/extra/p7zip/fix-uintxx_t-redefined.patch @@ -0,0 +1,23 @@ +diff --git a/C/hashes/hash.h b/C/hashes/hash.h +index 3abf275..5084b25 100644 +--- a/C/hashes/hash.h ++++ b/C/hashes/hash.h +@@ -42,17 +42,7 @@ + + #include "../7zTypes.h" + +-#ifndef _UINT32_T_DECLARED +-typedef UInt32 uint32_t; +-#define _UINT32_T_DECLARED +-#endif +- +-#ifndef _UINT64_T_DECLARED +-typedef UInt64 uint64_t; +-#define _UINT64_T_DECLARED +-#endif +- +-//#include ++#include + + #ifndef min + #define min(a,b) (((a)>(b))?(b):(a)) -- cgit v1.2.3