--- ./AI/Skirmish/CircuitAI/CMakeLists.txt.orig	2021-01-01 16:10:55 UTC
+++ ./AI/Skirmish/CircuitAI/CMakeLists.txt
@@ -9,7 +9,7 @@ if (WIN32)  # spring::condition_variable_any requireme
 elseif (APPLE)
 	set(additionalSources  ${additionalSources} ${CMAKE_SOURCE_DIR}/rts/System/Platform/Mac/Signal.cpp)
 else ()
-	set(additionalSources  ${additionalSources} ${CMAKE_SOURCE_DIR}/rts/System/Platform/Linux/Futex.cpp)
+	#set(additionalSources  ${additionalSources} ${CMAKE_SOURCE_DIR}/rts/System/Platform/Linux/Futex.cpp)
 endif ()
 set(additionalLibraries    ${Cpp_AIWRAPPER_TARGET} CUtils)
 #set(additionalLibraries    ${Cpp_AIWRAPPER_TARGET} CUtils ${SDL2_LIBRARY})
--- rts/System/CMakeLists.txt.orig	2020-12-26 12:45:43 UTC
+++ rts/System/CMakeLists.txt
@@ -140,7 +140,7 @@ set(sources_engine_System_Threading_Mac
 		"${CMAKE_CURRENT_SOURCE_DIR}/Platform/Mac/Signal.cpp"
 	)
 set(sources_engine_System_Threading_Linux
-		"${CMAKE_CURRENT_SOURCE_DIR}/Platform/Linux/Futex.cpp"
+		"${CMAKE_CURRENT_SOURCE_DIR}/Platform/Mac/Signal.cpp"
 		"${CMAKE_CURRENT_SOURCE_DIR}/Platform/Linux/ThreadSupport.cpp"
 	)
 set(sources_engine_System_Threading_Windows
--- rts/System/Platform/Linux/Futex.h.orig	2020-12-26 12:45:43 UTC
+++ rts/System/Platform/Linux/Futex.h
@@ -8,7 +8,7 @@
 #include "System/Misc/SpringTime.h"
 
 
-
+#ifndef __FreeBSD__
 class spring_futex
 {
 private:
@@ -32,6 +32,7 @@ class spring_futex (public)
 protected:
 	native_type mtx;
 };
+#endif
 
 /*FIXME
 class recursive_futex
--- rts/System/Threading/SpringThreading.h.orig	2020-12-26 12:45:43 UTC
+++ rts/System/Threading/SpringThreading.h
@@ -13,7 +13,7 @@
 
 #if   defined(_WIN32)
 	#include "System/Platform/Win/CriticalSection.h"
-#elif defined(__APPLE__) || !defined(USE_FUTEX)
+#elif defined(__APPLE__) || defined(__FreeBSD__) || !defined(USE_FUTEX)
 	#include "System/Platform/Mac/Signal.h"
 #elif !defined(__APPLE__) && defined(USE_FUTEX)
 	#include "System/Platform/Linux/Futex.h"
@@ -37,7 +37,7 @@ namespace spring {
 	typedef CriticalSection recursive_mutex;
 	typedef win_signal signal;
 	typedef std::condition_variable_any condition_variable;
-#elif defined(__APPLE__) || !defined(USE_FUTEX)
+#elif defined(__APPLE__) || defined(__FreeBSD__) || !defined(USE_FUTEX)
 	typedef std::mutex mutex;
 	typedef std::recursive_mutex recursive_mutex;
 	typedef mac_signal signal;
