diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-09-05 20:49:28 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-10-04 19:29:14 +0200 |
commit | a7329e5fc22433dfeaf7af22fb40fe3cada21385 (patch) | |
tree | 6f5b3cffe2e60d5f6455205faf5856bda994f7b8 /libavutil/x86 | |
parent | f6fbce761ea697f437cef721ec6711ffcbd1ac1f (diff) | |
download | ffmpeg-a7329e5fc22433dfeaf7af22fb40fe3cada21385.tar.gz |
x86: get_cpu_flags: add necessary ifdefs around function body
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.
Diffstat (limited to 'libavutil/x86')
-rw-r--r-- | libavutil/x86/cpu.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavutil/x86/cpu.c b/libavutil/x86/cpu.c index 5b658d1bed..dab2cac0cb 100644 --- a/libavutil/x86/cpu.c +++ b/libavutil/x86/cpu.c @@ -89,6 +89,9 @@ static int cpuid_test(void) int ff_get_cpu_flags_x86(void) { int rval = 0; + +#ifdef cpuid + int eax, ebx, ecx, edx; int max_std_level, max_ext_level, std_caps = 0, ext_caps = 0; int family = 0, model = 0; @@ -192,5 +195,7 @@ int ff_get_cpu_flags_x86(void) rval |= AV_CPU_FLAG_ATOM; } +#endif /* cpuid */ + return rval; } |