From 82ffb81c9cafbcdf7b1f56f9644883fe8398faa5 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Fri, 5 Feb 2021 15:03:32 +0100 Subject: [PATCH] cpu: Only include if available This header is not present on several non-Linux targets that nonetheless support aarch64. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- meson.build | 1 + src/cpu/cpu_arm.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 095d6ca664..766bc06b61 100644 --- a/meson.build +++ b/meson.build @@ -690,6 +690,7 @@ headers = [ 'net/if.h', 'pty.h', 'pwd.h', + 'sys/auxv.h', 'sys/ioctl.h', 'sys/mount.h', 'sys/syscall.h', diff --git a/src/cpu/cpu_arm.c b/src/cpu/cpu_arm.c index 6ba5bf0724..aa3e5d8980 100644 --- a/src/cpu/cpu_arm.c +++ b/src/cpu/cpu_arm.c @@ -25,7 +25,9 @@ # if defined(WITH_ASM_HWCAP_H) # include # endif -# include +# if defined(WITH_SYS_AUXV_H) +# include +# endif #endif #include "viralloc.h"