aboutsummaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
Diffstat (limited to 'external')
-rw-r--r--external/easylogging++/easylogging++.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/external/easylogging++/easylogging++.h b/external/easylogging++/easylogging++.h
index 688648452..3395c2cb2 100644
--- a/external/easylogging++/easylogging++.h
+++ b/external/easylogging++/easylogging++.h
@@ -104,8 +104,13 @@
#else
# define ELPP_OS_SOLARIS 0
#endif
+#if (defined(__DragonFly__))
+# define ELPP_OS_DRAGONFLY 1
+#else
+# define ELPP_OS_DRAGONFLY 0
+#endif
// Unix
-#if ((ELPP_OS_LINUX || ELPP_OS_MAC || ELPP_OS_FREEBSD || ELPP_OS_SOLARIS) && (!ELPP_OS_WINDOWS))
+#if ((ELPP_OS_LINUX || ELPP_OS_MAC || ELPP_OS_FREEBSD || ELPP_OS_SOLARIS || ELPP_OS_DRAGONFLY) && (!ELPP_OS_WINDOWS))
# define ELPP_OS_UNIX 1
#else
# define ELPP_OS_UNIX 0
@@ -1001,7 +1006,11 @@ namespace el {
public:
Mutex(void) {
# if ELPP_OS_UNIX
- pthread_mutex_init(&m_underlyingMutex, nullptr);
+ pthread_mutexattr_t attr;
+ pthread_mutexattr_init(&attr);
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+ pthread_mutex_init(&m_underlyingMutex, &attr);
+ pthread_mutexattr_destroy(&attr);
# elif ELPP_OS_WINDOWS
InitializeCriticalSection(&m_underlyingMutex);
# endif // ELPP_OS_UNIX