diff --git a/src/cpuinfo/SDL_cpuinfo.c b/src/cpuinfo/SDL_cpuinfo.c index 1920e83d6..a1cc86d4d 100644 --- a/src/cpuinfo/SDL_cpuinfo.c +++ b/src/cpuinfo/SDL_cpuinfo.c @@ -54,9 +54,6 @@ #include #include /* For AltiVec check */ #include -#if defined(HAVE_ELF_AUX_INFO) -#include -#endif #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP #include #include @@ -94,6 +91,10 @@ #endif #endif +#if defined(HAVE_ELF_AUX_INFO) +#include +#endif + #ifdef __RISCOS__ #include #include @@ -465,7 +466,7 @@ CPU_haveNEON(void) return 0; /* assume anything else from Apple doesn't have NEON. */ #elif defined(__OpenBSD__) return 1; /* OpenBSD only supports ARMv7 CPUs that have NEON. */ -#elif defined(HAVE_ELF_AUX_INFO) +#elif defined(HAVE_ELF_AUX_INFO) && defined(HWCAP_NEON) unsigned long hasneon = 0; if (elf_aux_info(AT_HWCAP, (void *)&hasneon, (int)sizeof(hasneon)) != 0) return 0; @@ -494,7 +495,7 @@ CPU_haveNEON(void) /* Use the VFPSupport_Features SWI to access the MVFR registers */ { _kernel_swi_regs regs; - regs.r[0] = 0; + regs.r[0] = 0; if (_kernel_swi(VFPSupport_Features, ®s, ®s) == NULL) { if ((regs.r[2] & 0xFFF000) == 0x111000) { return 1;