Index: rts/System/Platform/Threading.cpp
--- rts/System/Platform/Threading.cpp.orig
+++ rts/System/Platform/Threading.cpp
@@ -13,6 +13,7 @@
 	#include "System/Sync/FPUCheck.h"
 #endif
 
+#include <algorithm>
 #include <functional>
 #include <memory>
 #include <numeric>
@@ -511,6 +512,8 @@ namespace Threading {
 	#ifndef _WIN32
 	#ifdef __APPLE__
 		pthread_setname_np(newname.c_str());
+	#elif defined(__OpenBSD__)
+		pthread_set_name_np(pthread_self(), newname.c_str());
 	#else
 		prctl(PR_SET_NAME, newname.c_str(), 0, 0, 0);
 	#endif
