Fix building crc32_arm64 on NetBSD/aarch64

pmull_supported is not necessarily defined before crc32c_aarch64

Signed-off-by: Nia Alarie <nia@NetBSD.org>
This commit is contained in:
nia 2021-07-03 11:27:56 +02:00 committed by Daniel Black
parent 1519013f51
commit 316a8cebf5

View file

@ -2,13 +2,13 @@
#include <string.h>
#include <stdint.h>
static int pmull_supported;
#if defined(HAVE_ARMV8_CRC)
#if defined(__APPLE__)
#include <sys/sysctl.h>
static int pmull_supported;
int crc32_aarch64_available(void)
{
int ret;
@ -48,8 +48,6 @@ static unsigned long getauxval(unsigned int key)
# define HWCAP_PMULL (1 << 4)
#endif
static int pmull_supported;
/* ARM made crc32 default from ARMv8.1 but optional in ARMv8A
* Runtime check API.
*/