From 57704cfa685880843a7fcf9250870396fd50a2fa Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Tue, 21 Jul 2015 18:48:26 -0400
Subject: Fixes to build on Haiku.


diff --git a/qtools/qglobal.h b/qtools/qglobal.h
index c3f7594..ef3e98c 100644
--- a/qtools/qglobal.h
+++ b/qtools/qglobal.h
@@ -134,6 +134,8 @@
 #define _OS_CYGWIN_
 #elif defined(__BEOS__)
 #define _OS_BEOS_
+#elif defined(__HAIKU__)
+#define _OS_HAIKU_
 #elif defined(__MINT__)
 #define _OS_MINT_
 #else
diff --git a/qtools/qthread_unix.cpp b/qtools/qthread_unix.cpp
index 5871605..247dca2 100644
--- a/qtools/qthread_unix.cpp
+++ b/qtools/qthread_unix.cpp
@@ -136,7 +136,7 @@ void QThread::start()
     pthread_attr_t attr;
     pthread_attr_init(&attr);
     pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_DETACHED);
-#ifndef __ANDROID__
+#if !defined(__ANDROID__) && !defined(__HAIKU__)
     pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
 #endif
     if (d->stackSize>0)
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 00826d6..be8f076 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -10322,7 +10322,7 @@ void readConfiguration(int argc, char **argv)
           Config::init();
           if (optind+4<argc || QFileInfo("Doxyfile").exists())
           {
-            QCString df = optind+4<argc ? argv[optind+4] : QCString("Doxyfile");
+            QCString df = optind+4<argc ? (QCString)argv[optind+4] : QCString("Doxyfile");
             if (!Config::parse(df))
             {
               err("error opening or reading configuration file %s!\n",argv[optind+4]);
-- 
2.16.2

