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
9595 #endif
9696 if (ret & AV_CPU_FLAG_VSX)
9797 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) {
99101 #ifdef PPC_FEATURE2_ARCH_2_07
100102 if (buf[i + 1] & PPC_FEATURE2_ARCH_2_07)
101103 ret |= AV_CPU_FLAG_POWER8;
102104 #endif
103105 }
106+#endif /* AT_HWCAP2 */
104107 }
105108 }
106109

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