From c3a1be2e5e38ca00d61a19d8728d11774abe909b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 22 Oct 2017 13:55:25 +0200
Subject: Pthread support


diff --git a/src/actions.cpp b/src/actions.cpp
index a941d67..57b7792 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -1991,7 +1991,7 @@ namespace {
  /* Unix/Linux/Cygwin/macOS */
  #include <pthread.h>
  /* This is the critical section object (statically allocated). */
- #if defined(__APPLE__)
+ #if defined(__APPLE__) || defined(__HAIKU__)
   #if defined(PTHREAD_RECURSIVE_MUTEX_INITIALIZER)
     static pthread_mutex_t cs =  PTHREAD_RECURSIVE_MUTEX_INITIALIZER;
    #else
-- 
2.30.0


From 7a02ca819f49d79b26cc88088c193145dbc21466 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 7 Jan 2021 21:03:05 +0100
Subject: Haiku: disable stack protector


diff --git a/cmake/compilerFlags.cmake b/cmake/compilerFlags.cmake
index 0418aa6..9f42ce9 100644
--- a/cmake/compilerFlags.cmake
+++ b/cmake/compilerFlags.cmake
@@ -24,7 +24,7 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
     if (COMPILER_IS_GCC OR COMPILER_IS_CLANG)
 
         # This fails under Fedora, MinGW GCC 8.3.0 and CYGWIN/MSYS 9.3.0
-        if (NOT (MINGW OR CMAKE_HOST_SOLARIS OR CYGWIN OR MSYS) )
+        if (NOT (MINGW OR CMAKE_HOST_SOLARIS OR CYGWIN OR MSYS OR HAIKU) )
             if (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
                 add_compile_options(-fstack-clash-protection -fcf-protection)
             endif()
-- 
2.30.0

