ref: 03d59ea50c9bae3fcb3f3224b3e60ab9c97e2ddb
parent: 40dc545e20541de60d2e360925957d6b0fe3dc97
author: Janne Grunau <[email protected]>
date: Thu Nov 1 15:52:56 EDT 2018
arm: use defined() for defines which are not guaranteed to be defined
--- a/src/arm/cpu.c
+++ b/src/arm/cpu.c
@@ -29,7 +29,7 @@
#include "src/arm/cpu.h"
-#if HAVE_GETAUXVAL
+#if defined(HAVE_GETAUXVAL)
#include <sys/auxv.h>
#if ARCH_AARCH64
@@ -71,12 +71,12 @@
unsigned dav1d_get_cpu_flags_arm(void) {
unsigned flags = 0;
-#if HAVE_GETAUXVAL
+#if defined(HAVE_GETAUXVAL)
unsigned long hw_cap = getauxval(AT_HWCAP);
flags |= (hw_cap & NEON_HWCAP) ? DAV1D_ARM_CPU_FLAG_NEON : 0;
#elif defined(__ANDROID__)
flags |= parse_proc_cpuinfo("neon") ? DAV1D_ARM_CPU_FLAG_NEON : 0;
-#elif __APPLE__
+#elif defined(__APPLE__)
flags |= DAV1D_ARM_CPU_FLAG_NEON;
#elif defined(_WIN32)
flags |= DAV1D_ARM_CPU_FLAG_NEON;