From: Anton Mitrofanov Date: Sat, 5 Feb 2022 20:33:10 +0000 (+0000) Subject: Fix build on OpenBSD and Android X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5585eafe31c2299163dcb206e05e18be7dd93098;p=libx264 Fix build on OpenBSD and Android --- diff --git a/common/cpu.c b/common/cpu.c index 6cc54869..41a4c1d7 100644 --- a/common/cpu.c +++ b/common/cpu.c @@ -27,19 +27,24 @@ #include "base.h" -#if HAVE_POSIXTHREAD && SYS_LINUX +#if SYS_CYGWIN || SYS_SunOS || SYS_OPENBSD +#include +#endif +#if SYS_LINUX +#ifdef __ANDROID__ +#include +#else #include #endif +#endif #if SYS_BEOS #include #endif -#if SYS_MACOSX || SYS_FREEBSD +#if SYS_MACOSX || SYS_OPENBSD || SYS_FREEBSD #include #include #endif #if SYS_OPENBSD -#include -#include #include #endif @@ -301,7 +306,7 @@ uint32_t x264_cpu_detect( void ) #elif HAVE_ALTIVEC #if SYS_MACOSX || SYS_OPENBSD || SYS_FREEBSD -#include + uint32_t x264_cpu_detect( void ) { /* Thank you VLC */