Add more BSDs and update to modern way to get thread ID

--- Source/GmmLib/Utility/GmmLog/spdlog/details/os.h.orig	2018-09-28 18:59:39 UTC
+++ Source/GmmLib/Utility/GmmLog/spdlog/details/os.h
@@ -39,9 +39,15 @@
 #include <unistd.h>
 #include <chrono>
 
-#elif __FreeBSD__
-#include <sys/thr.h> //Use thr_self() syscall under FreeBSD to get thread id
+#elif defined(__DragonFly__)
+#include <unistd.h>      // for lwp_gettid
 
+#elif defined(__FreeBSD__)
+#include <pthread_np.h>  // for pthread_getthreadid_np
+
+#elif defined(__NetBSD__)
+#include <lwp.h>         // for _lwp_self
+
 #else
 #include <thread>
 
@@ -302,10 +308,12 @@ inline size_t thread_id()
 #  define SYS_gettid __NR_gettid
 # endif
     return  static_cast<size_t>(syscall(SYS_gettid));
-#elif __FreeBSD__
-    long tid;
-    thr_self(&tid);
-    return static_cast<size_t>(tid);
+#elif defined(__DragonFly__)
+    return static_cast<size_t>(lwp_gettid());
+#elif defined(__FreeBSD__)
+    return static_cast<size_t>(pthread_getthreadid_np());
+#elif defined(__NetBSD__)
+    return static_cast<size_t>(_lwp_self());
 #else //Default to standard C++11 (OSX and other Unix)
     return static_cast<size_t>(std::hash<std::thread::id>()(std::this_thread::get_id()));
 #endif
