Skip to content

Commit d3e305f

Browse files
committed
Fix auxv header
1 parent b1b0c33 commit d3e305f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

include/xsimd/config/xsimd_cpuid.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "./xsimd_cpu_features_x86.hpp"
1818
#include "./xsimd_inline.hpp"
1919

20-
#if XSIMD_WITH_LINUX_GETAUXVAL
20+
#if XSIMD_WITH_LINUX_GETAUXVAL && defined(__riscv_vector)
2121
#include <asm/hwcap.h>
2222
#include <sys/auxv.h>
2323
#endif

include/xsimd/config/xsimd_getauxval.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
#include "./xsimd_config.hpp"
1717

1818
#if XSIMD_WITH_LINUX_GETAUXVAL
19-
#include <asm/hwcap.h>
20-
#include <sys/auxv.h>
19+
#include <sys/auxv.h> // getauxval
20+
#if XSIMD_TARGET_ARM
21+
#include <asm/hwcap.h> // HWCAP_XXX
22+
#endif
2123
#endif
2224

2325
namespace xsimd

0 commit comments

Comments
 (0)