diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2021-09-29 10:58:23 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2021-10-11 17:32:48 +0200 |
commit | b8f8a434e2415b7a5239bfef720f9e9566f863fd (patch) | |
tree | a5c76ed6fb26b560062196a974d8d9f40a50ba59 /package/php/patches/patch-ext_standard_crc32_c | |
parent | 18bea4005fc0a1c7a44dbf10a51f336ecece3ea2 (diff) |
php: update to 7.4.24
Diffstat (limited to 'package/php/patches/patch-ext_standard_crc32_c')
-rw-r--r-- | package/php/patches/patch-ext_standard_crc32_c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/package/php/patches/patch-ext_standard_crc32_c b/package/php/patches/patch-ext_standard_crc32_c new file mode 100644 index 000000000..c04b5b80c --- /dev/null +++ b/package/php/patches/patch-ext_standard_crc32_c @@ -0,0 +1,38 @@ +--- php-7.4.24.orig/ext/standard/crc32.c 2021-09-21 13:23:20.000000000 +0200 ++++ php-7.4.24/ext/standard/crc32.c 2021-09-29 10:27:37.144637295 +0200 +@@ -23,7 +23,6 @@ + #if HAVE_AARCH64_CRC32 + # include <arm_acle.h> + # if defined(__linux__) +-# include <sys/auxv.h> + # include <asm/hwcap.h> + # endif + +@@ -32,13 +31,6 @@ static inline int has_crc32_insn() { + static int res = -1; + if (res != -1) + return res; +-# if defined(HWCAP_CRC32) +- res = getauxval(AT_HWCAP) & HWCAP_CRC32; +- return res; +-# elif defined(HWCAP2_CRC32) +- res = getauxval(AT_HWCAP2) & HWCAP2_CRC32; +- return res; +-# else + res = 0; + return res; + # endif +@@ -85,13 +77,6 @@ PHP_NAMED_FUNCTION(php_if_crc32) + + crc = crcinit^0xFFFFFFFF; + +-#if HAVE_AARCH64_CRC32 +- if (has_crc32_insn()) { +- crc = crc32_aarch64(crc, p, nr); +- RETURN_LONG(crc^0xFFFFFFFF); +- } +-#endif +- + for (; nr--; ++p) { + crc = ((crc >> 8) & 0x00FFFFFF) ^ crc32tab[(crc ^ (*p)) & 0xFF ]; + } |