From e998618a66374bcd29069dbc794e45597496f996 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Wed, 26 Sep 2018 13:33:44 +0200
Subject: Haiku: include sdint.h to define uintptr_t.


diff --git a/include/cmocka.h b/include/cmocka.h
index 9b47ceb..e88c9f8 100644
--- a/include/cmocka.h
+++ b/include/cmocka.h
@@ -122,6 +122,8 @@ typedef uintmax_t LargestIntegralType;
     typedef unsigned int uintptr_t;
 # elif defined(_WIN64)
     typedef unsigned long int uintptr_t;
+# elif defined(__HAIKU__)
+    #include <stdint.h>
 # else /* _WIN32 */
 
 /* ILP32 and LP64 platforms */
-- 
2.21.0


From d184362784d72fb2a2ac7b5d1e4aaff99417bdaa Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 22 Mar 2019 21:14:31 +0100
Subject: disable stack protector for Haiku


diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake
index b326807..70ff254 100644
--- a/CompilerChecks.cmake
+++ b/CompilerChecks.cmake
@@ -66,7 +66,7 @@ if (UNIX)
         endif()
     endif()
 
-    check_c_compiler_flag_ssp("-fstack-protector-strong" WITH_STACK_PROTECTOR_STRONG)
+    #check_c_compiler_flag_ssp("-fstack-protector-strong" WITH_STACK_PROTECTOR_STRONG)
     if (WITH_STACK_PROTECTOR_STRONG)
         list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector-strong")
         # This is needed as Solaris has a seperate libssp
@@ -74,7 +74,7 @@ if (UNIX)
             list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector-strong")
         endif()
     else (WITH_STACK_PROTECTOR_STRONG)
-        check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR)
+        #check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR)
         if (WITH_STACK_PROTECTOR)
             list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector")
             # This is needed as Solaris has a seperate libssp
-- 
2.21.0

