diff options
author | Miroslav Šulc <fordfrog@gentoo.org> | 2020-09-27 19:55:05 +0200 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2020-09-27 19:55:36 +0200 |
commit | 7b230dffe237b6e7868b26b6ba648df35d97c4b6 (patch) | |
tree | 0eac58f2520c518022f56b304c076dfc42493d2c /dev-libs/sord/files | |
parent | profiles: ppc64: Drop obsolete x11-libs/vte:0[python] p.use.stable.mask (diff) | |
download | gentoo-7b230dffe237b6e7868b26b6ba648df35d97c4b6.tar.gz gentoo-7b230dffe237b6e7868b26b6ba648df35d97c4b6.tar.bz2 gentoo-7b230dffe237b6e7868b26b6ba648df35d97c4b6.zip |
dev-libs/sord: bump to 0.16.6 + updated live
Bug: https://bugs.gentoo.org/723150
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-libs/sord/files')
-rw-r--r-- | dev-libs/sord/files/sord-0.16.6-x86_32.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/dev-libs/sord/files/sord-0.16.6-x86_32.patch b/dev-libs/sord/files/sord-0.16.6-x86_32.patch new file mode 100644 index 000000000000..3effc4d44dc3 --- /dev/null +++ b/dev-libs/sord/files/sord-0.16.6-x86_32.patch @@ -0,0 +1,44 @@ +diff --git a/src/zix/digest.c b/src/zix/digest.c +index 889cfde..00b9fcf 100644 +--- a/src/zix/digest.c ++++ b/src/zix/digest.c +@@ -38,10 +38,12 @@ zix_digest_add(uint32_t hash, const void* const buf, const size_t len) + { + const uint8_t* str = (const uint8_t*)buf; + ++#ifdef __x86_64__ + for (size_t i = 0; i < (len / sizeof(uint64_t)); ++i) { + hash = (uint32_t)_mm_crc32_u64(hash, *(const uint64_t*)str); + str += sizeof(uint64_t); + } ++#endif + if (len & sizeof(uint32_t)) { + hash = _mm_crc32_u32(hash, *(const uint32_t*)str); + str += sizeof(uint32_t); +@@ -57,6 +59,7 @@ zix_digest_add(uint32_t hash, const void* const buf, const size_t len) + return hash; + } + ++#ifdef __x86_64__ + ZIX_API uint32_t + zix_digest_add_64(uint32_t hash, const void* const buf, const size_t len) + { +@@ -72,12 +75,17 @@ zix_digest_add_64(uint32_t hash, const void* const buf, const size_t len) + + return hash; + } ++#endif + + ZIX_API uint32_t + zix_digest_add_ptr(const uint32_t hash, const void* const ptr) + { + #if UINTPTR_MAX == UINT64_MAX +- return (uint32_t)_mm_crc32_u64(hash, (uintptr_t)ptr); ++ #ifdef __x86_64__ ++ return (uint32_t)_mm_crc32_u64(hash, (uintptr_t)ptr); ++ #else ++ return (uint32_t)_mm_crc32_u32(hash, (uintptr_t)ptr); ++ #endif + #else + return _mm_crc32_u32(hash, (uintptr_t)ptr); + #endif |