1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

DragonFly BSD is somewhat identical to FreeBSD (#8159)

This commit is contained in:
Leonid Bobrov
2019-02-03 10:53:54 +02:00
committed by Loïc Blot
parent 70672e1cb7
commit 339341ba4e
6 changed files with 9 additions and 9 deletions

View File

@@ -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;