From 39af8c72e618a544baa06ae427fb2b440861abcd Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Fri, 13 Jun 2014 19:56:27 +0000 Subject: [PATCH 1/1] Haiku support Add Haiku as supported platform in configure. Haiku has no nice() function, use the platform specific substitute instead. --- common/osdep.h | 4 ++++ configure | 3 +++ 2 files changed, 7 insertions(+) diff --git a/common/osdep.h b/common/osdep.h index a94c5250..96596b7d 100644 --- a/common/osdep.h +++ b/common/osdep.h @@ -369,6 +369,10 @@ static ALWAYS_INLINE void x264_prefetch( void *p ) sp.sched_priority -= p;\ pthread_setschedparam( handle, policy, &sp );\ } +#elif SYS_HAIKU +#include +#define x264_lower_thread_priority(p)\ + { UNUSED status_t nice_ret = set_thread_priority( find_thread( NULL ), B_LOW_PRIORITY ); } #else #include #define x264_lower_thread_priority(p) { UNUSED int nice_ret = nice(p); } diff --git a/configure b/configure index 57a47acc..681535c8 100755 --- a/configure +++ b/configure @@ -651,6 +651,9 @@ case $host_os in HAVE_GETOPT_LONG=0 CFLAGS="$CFLAGS -I\$(SRCPATH)/extras" ;; + *haiku*) + SYS="HAIKU" + ;; *) die "Unknown system $host, edit the configure" ;; -- 2.39.2