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 a94c525..96596b7 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 57a47ac..681535c 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"
         ;;