Skip to content

Commit d8f15d9

Browse files
committed
Fix build support for RISCV64
HWCAP_NEON does not seem to be defined for the RISCV-64 arch (understandably). To avoid build issues hide it behind the ifdef
1 parent 269e102 commit d8f15d9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/distance-cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ float bit1_distance_hamming_cpu (const void *v1, const void *v2, int n) {
844844
#include <sys/auxv.h>
845845
#include <asm/hwcap.h>
846846
bool cpu_supports_neon (void) {
847-
#ifdef AT_HWCAP
847+
#if defined(AT_HWCAP) && defined(HWCAP_NEON)
848848
return (getauxval(AT_HWCAP) & HWCAP_NEON) != 0;
849849
#else
850850
return false;

0 commit comments

Comments
 (0)