WIP recipe for VCMI.

This will need some fixes to boost.
This commit is contained in:
Adrien Destugues
2014-01-05 23:15:22 +01:00
parent f4c103d15e
commit be4ea30d34
2 changed files with 108 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
From fc69e8dc4e2287cef93857a29d80b8930b90baa9 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 5 Jan 2014 23:14:13 +0100
Subject: Support thread renaming.
diff --git a/lib/CThreadHelper.cpp b/lib/CThreadHelper.cpp
index 3774c4b..b0aca56 100644
--- a/lib/CThreadHelper.cpp
+++ b/lib/CThreadHelper.cpp
@@ -3,6 +3,8 @@
#ifdef _WIN32
#include <windows.h>
+#elif defined(__HAIKU__)
+ #include <OS.h>
#elif !defined(__APPLE__)
#include <sys/prctl.h>
#endif
@@ -80,6 +82,8 @@ void setThreadName(const std::string &name)
//not supported
#endif
+#elif defined(__HAIKU__)
+ rename_thread(find_thread(NULL), name.c_str());
#elif defined(__linux__)
prctl(PR_SET_NAME, name.c_str(), 0, 0, 0);
#endif
--
1.8.3.4