[x264-devel] [Git][videolan/x264][master] Fix build on OpenBSD and Android

Anton Mitrofanov (@BugMaster) gitlab at videolan.org
Sat Feb 5 20:33:21 UTC 2022



Anton Mitrofanov pushed to branch master at VideoLAN / x264


Commits:
5585eafe by Anton Mitrofanov at 2022-02-05T20:33:10+00:00
Fix build on OpenBSD and Android

- - - - -


1 changed file:

- common/cpu.c


Changes:

=====================================
common/cpu.c
=====================================
@@ -27,19 +27,24 @@
 
 #include "base.h"
 
-#if HAVE_POSIXTHREAD && SYS_LINUX
+#if SYS_CYGWIN || SYS_SunOS || SYS_OPENBSD
+#include <unistd.h>
+#endif
+#if SYS_LINUX
+#ifdef __ANDROID__
+#include <unistd.h>
+#else
 #include <sched.h>
 #endif
+#endif
 #if SYS_BEOS
 #include <kernel/OS.h>
 #endif
-#if SYS_MACOSX || SYS_FREEBSD
+#if SYS_MACOSX || SYS_OPENBSD || SYS_FREEBSD
 #include <sys/types.h>
 #include <sys/sysctl.h>
 #endif
 #if SYS_OPENBSD
-#include <sys/param.h>
-#include <sys/sysctl.h>
 #include <machine/cpu.h>
 #endif
 
@@ -301,7 +306,7 @@ uint32_t x264_cpu_detect( void )
 #elif HAVE_ALTIVEC
 
 #if SYS_MACOSX || SYS_OPENBSD || SYS_FREEBSD
-#include <sys/sysctl.h>
+
 uint32_t x264_cpu_detect( void )
 {
     /* Thank you VLC */



View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/5585eafe31c2299163dcb206e05e18be7dd93098

-- 
View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/5585eafe31c2299163dcb206e05e18be7dd93098
You're receiving this email because of your account on code.videolan.org.




More information about the x264-devel mailing list