#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
#elif HAVE_ALTIVEC
#if SYS_MACOSX || SYS_OPENBSD || SYS_FREEBSD
-#include <sys/sysctl.h>
+
uint32_t x264_cpu_detect( void )
{
/* Thank you VLC */