From 7814596fa91a07fb2f1d0972f93f26de8a4ad547 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 14 Jun 2023 14:13:35 -0700 Subject: [PATCH] cksum: fix bug in check for cksum_pclmul MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This fixes a typo in the previous patch. Problem reported by Pádraig Brady . * src/cksum.c (pclmul_supported): Also require AVX support to use cksum_pclmul. --- src/cksum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cksum.c b/src/cksum.c index 631ac3449b..e935ba75c8 100644 --- a/src/cksum.c +++ b/src/cksum.c @@ -160,7 +160,8 @@ static bool pclmul_supported (void) { # if USE_PCLMUL_CRC32 - bool pclmul_enabled = 0 < __builtin_cpu_supports ("pclmul"); + bool pclmul_enabled = (0 < __builtin_cpu_supports ("pclmul") + && 0 < __builtin_cpu_supports ("avx")); if (cksum_debug) error (0, 0, "%s", -- 2.47.2