History

libavutil/ppc/cpu.c: check that AT_HWCAP2 is defined

It was not introduced until glibc 2.18.

Sean McGovern committed 3 years ago

Commit d799ad21 parent 5feceed1 file · +4 −1Browse files

Unified · Split

libavutil/ppc/cpu.c+4−1
@@ -95,12 +95,15 @@ int ff_get_cpu_flags_ppc(void) · 94 unmodified lines
95#endif95#endif
96 if (ret & AV_CPU_FLAG_VSX)96 if (ret & AV_CPU_FLAG_VSX)
97 av_assert0(ret & AV_CPU_FLAG_ALTIVEC);97 av_assert0(ret & AV_CPU_FLAG_ALTIVEC);
98 } else if (buf[i] == AT_HWCAP2) {98 }
99#ifdef AT_HWCAP2 /* not introduced until glibc 2.18 */
100 else if (buf[i] == AT_HWCAP2) {
99#ifdef PPC_FEATURE2_ARCH_2_07101#ifdef PPC_FEATURE2_ARCH_2_07
100 if (buf[i + 1] & PPC_FEATURE2_ARCH_2_07)102 if (buf[i + 1] & PPC_FEATURE2_ARCH_2_07)
101 ret |= AV_CPU_FLAG_POWER8;103 ret |= AV_CPU_FLAG_POWER8;
102#endif104#endif
103 }105 }
106#endif /* AT_HWCAP2 */
104 }107 }
105 }108 }
106 109

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t