diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2019-07-10 01:16:24 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2019-07-10 01:16:24 +0000 |
commit | 8fd0fb2b98ff00af86fd3ddb028fff4d1b0c5003 (patch) | |
tree | da359d15146e7d177ee74a98e5f4cf92eb39a58c /devel/android-tools-fastboot | |
parent | multimedia/libva: drop -lpthread on FreeBSD 11.4/12.1/13.0 (diff) |
Add more gettid() aliases to my ports
https://man.openbsd.org/getthrid.2
https://illumos.org/man/3C/thr_self
Notes
Notes:
svn path=/head/; revision=506330
Diffstat (limited to 'devel/android-tools-fastboot')
-rw-r--r-- | devel/android-tools-fastboot/files/patch-base_logging.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/devel/android-tools-fastboot/files/patch-base_logging.cpp b/devel/android-tools-fastboot/files/patch-base_logging.cpp index 5077161ff926..c85502208e86 100644 --- a/devel/android-tools-fastboot/files/patch-base_logging.cpp +++ b/devel/android-tools-fastboot/files/patch-base_logging.cpp @@ -18,7 +18,7 @@ #include <iostream> #include <limits> #include <sstream> -@@ -71,6 +72,12 @@ +@@ -71,6 +72,16 @@ #include <unistd.h> #elif defined(_WIN32) #include <windows.h> @@ -26,12 +26,16 @@ +#include <pthread_np.h> +#elif defined(__NetBSD__) +#include <lwp.h> -+#else // OpenBSD, Solaris ++#elif defined(__OpenBSD__) ++#include <unistd.h> ++#elif defined(__sun) ++#include <thread.h> ++#else // fallback +#include <stdint.h> #endif #if defined(_WIN32) -@@ -88,6 +97,12 @@ static thread_id GetThreadId() { +@@ -88,6 +97,16 @@ static thread_id GetThreadId() { return syscall(__NR_gettid); #elif defined(_WIN32) return GetCurrentThreadId(); @@ -39,7 +43,11 @@ + return pthread_getthreadid_np(); +#elif defined(__NetBSD__) + return _lwp_self(); -+#else // OpenBSD, Solaris ++#elif defined(__OpenBSD__) ++ return getthrid(); ++#elif defined(__sun) ++ return thr_self(); ++#else // fallback + return (intptr_t) pthread_self(); #endif } |