]> git.sesse.net Git - x264/commitdiff
Haiku support
authorJerome Duval <jerome.duval@gmail.com>
Fri, 13 Jun 2014 19:56:27 +0000 (19:56 +0000)
committerHenrik Gramner <henrik@gramner.com>
Sun, 11 Oct 2015 16:44:54 +0000 (18:44 +0200)
Add Haiku as supported platform in configure.
Haiku has no nice() function, use the platform specific substitute instead.

common/osdep.h
configure

index a94c52507c3be09df779da04068b716a47f60ed6..96596b7d7dd33d99b006510f0d524ad86a34cf51 100644 (file)
@@ -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 <OS.h>
+#define x264_lower_thread_priority(p)\
+    { UNUSED status_t nice_ret = set_thread_priority( find_thread( NULL ), B_LOW_PRIORITY ); }
 #else
 #include <unistd.h>
 #define x264_lower_thread_priority(p) { UNUSED int nice_ret = nice(p); }
index 57a47acc253529cdf91ab1e42e2660f5d2530f28..681535c8330a259e24000e92a870f85dec61fc82 100755 (executable)
--- 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"
         ;;