summaryrefslogtreecommitdiff
path: root/src/threading
diff options
context:
space:
mode:
authorLeonid Bobrov <mazocomp@disroot.org>2019-02-03 10:53:54 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2019-02-03 09:53:54 +0100
commit339341ba4e270cc86e82db008e6325f03d1046f7 (patch)
treee129e568fb172c567dc3c852a5bf5e9aa557fb25 /src/threading
parent70672e1cb7634afc8f884c3ff8a6dca1448abff7 (diff)
downloadminetest-339341ba4e270cc86e82db008e6325f03d1046f7.tar.gz
minetest-339341ba4e270cc86e82db008e6325f03d1046f7.tar.bz2
minetest-339341ba4e270cc86e82db008e6325f03d1046f7.zip
DragonFly BSD is somewhat identical to FreeBSD (#8159)
Diffstat (limited to 'src/threading')
-rw-r--r--src/threading/thread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/threading/thread.cpp b/src/threading/thread.cpp
index 3b6851389..e0f808c4d 100644
--- a/src/threading/thread.cpp
+++ b/src/threading/thread.cpp
@@ -31,7 +31,7 @@ DEALINGS IN THE SOFTWARE.
// for setName
#if defined(__linux__)
#include <sys/prctl.h>
-#elif defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#include <pthread_np.h>
#elif defined(_MSC_VER)
struct THREADNAME_INFO {
@@ -213,7 +213,7 @@ void Thread::setName(const std::string &name)
// distributions are still runing 2.11 and previous versions.
prctl(PR_SET_NAME, name.c_str());
-#elif defined(__FreeBSD__) || defined(__OpenBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
pthread_set_name_np(pthread_self(), name.c_str());
@@ -273,7 +273,7 @@ bool Thread::bindToProcessor(unsigned int proc_number)
return SetThreadAffinityMask(pthread_gethandle(getThreadHandle()), 1 << proc_number);
-#elif __FreeBSD_version >= 702106 || defined(__linux__)
+#elif __FreeBSD_version >= 702106 || defined(__linux__) || defined(__DragonFly__)
cpu_set_t cpuset;