aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check/crc32_fast.c
diff options
context:
space:
mode:
authorJia Tan <jiat0218@gmail.com>2023-10-14 10:23:03 +0800
committerJia Tan <jiat0218@gmail.com>2023-10-18 20:41:11 +0800
commita3ebc2c516b09616638060806c841bd4bcf7bce3 (patch)
treebaf6aec64d7b48ed3c0386a54a25cca0f242b59f /src/liblzma/check/crc32_fast.c
parentliblzma: Added crc32_clmul to crc32_fast.c. (diff)
downloadxz-a3ebc2c516b09616638060806c841bd4bcf7bce3.tar.xz
liblzma: Define CRC_USE_IFUNC in crc_common.h.
When ifunc is supported, we can define a simpler macro instead of repeating the more complex check in both crc32_fast.c and crc64_fast.c.
Diffstat (limited to '')
-rw-r--r--src/liblzma/check/crc32_fast.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/liblzma/check/crc32_fast.c b/src/liblzma/check/crc32_fast.c
index 5229a4bd..3ac9b6d7 100644
--- a/src/liblzma/check/crc32_fast.c
+++ b/src/liblzma/check/crc32_fast.c
@@ -272,8 +272,7 @@ crc32_dispatch(const uint8_t *buf, size_t size, uint32_t crc)
#endif
-#if defined(CRC_GENERIC) && defined(CRC_CLMUL) \
- && defined(HAVE_FUNC_ATTRIBUTE_IFUNC)
+#ifdef CRC_USE_IFUNC
extern LZMA_API(uint32_t)
lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
__attribute__((__ifunc__("crc32_resolve")));