Skip to content

Commit

Permalink
Fix building crc32_arm64 on NetBSD/aarch64
Browse files Browse the repository at this point in the history
pmull_supported is not necessarily defined before crc32c_aarch64

Signed-off-by: Nia Alarie <nia@NetBSD.org>
  • Loading branch information
alarixnia authored and grooverdan committed Jul 22, 2021
1 parent 1519013 commit 316a8ce
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mysys/crc32/crc32_arm64.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*/
Expand Down

0 comments on commit 316a8ce

Please sign in to comment.