ff_get_cpu_flags_x86() requires cpuid(), which is conditionally defined
elsewhere in the file.  Surrounding the function body with ifdefs allows
building even when cpuid is not defined.  An empty cpuflags mask is
returned in this case.
---
 libavutil/x86/cpu.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c
index 9acc867..509e7da 100644
--- a/libavutil/x86/cpu.c
+++ b/libavutil/x86/cpu.c
@@ -90,6 +90,8 @@
 int ff_get_cpu_flags_x86(void)
 {
     int rval = 0;
+#if HAVE_INLINE_ASM || HAVE_CPUID
+
     int eax, ebx, ecx, edx;
     int max_std_level, max_ext_level, std_caps = 0, ext_caps = 0;
     int family = 0, model = 0;
@@ -206,5 +208,7 @@ int ff_get_cpu_flags_x86(void)
             rval |= AV_CPU_FLAG_ATOM;
     }
 
+#endif /* HAVE_INLINE_ASM || HAVE_CPUID */
+
     return rval;
 }
-- 
1.7.1

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to