Commit 03d59ea5 authored by Janne Grunau's avatar Janne Grunau

arm: use defined() for defines which are not guaranteed to be defined

parent 40dc545e
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "src/arm/cpu.h" #include "src/arm/cpu.h"
#if HAVE_GETAUXVAL #if defined(HAVE_GETAUXVAL)
#include <sys/auxv.h> #include <sys/auxv.h>
#if ARCH_AARCH64 #if ARCH_AARCH64
...@@ -71,12 +71,12 @@ static unsigned parse_proc_cpuinfo(const char *flag) { ...@@ -71,12 +71,12 @@ static unsigned parse_proc_cpuinfo(const char *flag) {
unsigned dav1d_get_cpu_flags_arm(void) { unsigned dav1d_get_cpu_flags_arm(void) {
unsigned flags = 0; unsigned flags = 0;
#if HAVE_GETAUXVAL #if defined(HAVE_GETAUXVAL)
unsigned long hw_cap = getauxval(AT_HWCAP); unsigned long hw_cap = getauxval(AT_HWCAP);
flags |= (hw_cap & NEON_HWCAP) ? DAV1D_ARM_CPU_FLAG_NEON : 0; flags |= (hw_cap & NEON_HWCAP) ? DAV1D_ARM_CPU_FLAG_NEON : 0;
#elif defined(__ANDROID__) #elif defined(__ANDROID__)
flags |= parse_proc_cpuinfo("neon") ? DAV1D_ARM_CPU_FLAG_NEON : 0; flags |= parse_proc_cpuinfo("neon") ? DAV1D_ARM_CPU_FLAG_NEON : 0;
#elif __APPLE__ #elif defined(__APPLE__)
flags |= DAV1D_ARM_CPU_FLAG_NEON; flags |= DAV1D_ARM_CPU_FLAG_NEON;
#elif defined(_WIN32) #elif defined(_WIN32)
flags |= DAV1D_ARM_CPU_FLAG_NEON; flags |= DAV1D_ARM_CPU_FLAG_NEON;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment