diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2019-06-17 08:36:27 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2019-06-17 08:36:27 +0000 |
commit | 234ec471745291ff99705203deb89e0f86bcb5d6 (patch) | |
tree | f60c514d9b374340114b9a1e61a4e3a7a149de64 /devel/android-tools-adb | |
parent | edc42f3c38101cea58c0f69ccf772c5103697878 (diff) | |
download | ports-234ec471745291ff99705203deb89e0f86bcb5d6.tar.gz ports-234ec471745291ff99705203deb89e0f86bcb5d6.zip |
Notes
Diffstat (limited to 'devel/android-tools-adb')
-rw-r--r-- | devel/android-tools-adb/files/patch-base_logging.cpp | 12 | ||||
-rw-r--r-- | devel/android-tools-adb/files/patch-libcutils_threads.cpp | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/devel/android-tools-adb/files/patch-base_logging.cpp b/devel/android-tools-adb/files/patch-base_logging.cpp index 634f03f3ad0b..5077161ff926 100644 --- a/devel/android-tools-adb/files/patch-base_logging.cpp +++ b/devel/android-tools-adb/files/patch-base_logging.cpp @@ -18,13 +18,11 @@ #include <iostream> #include <limits> #include <sstream> -@@ -71,6 +72,14 @@ +@@ -71,6 +72,12 @@ #include <unistd.h> #elif defined(_WIN32) #include <windows.h> -+#elif defined(__DragonFly__) -+#include <unistd.h> -+#elif defined(__FreeBSD__) ++#elif defined(__DragonFly__) || defined(__FreeBSD__) +#include <pthread_np.h> +#elif defined(__NetBSD__) +#include <lwp.h> @@ -33,13 +31,11 @@ #endif #if defined(_WIN32) -@@ -88,6 +97,14 @@ static thread_id GetThreadId() { +@@ -88,6 +97,12 @@ static thread_id GetThreadId() { return syscall(__NR_gettid); #elif defined(_WIN32) return GetCurrentThreadId(); -+#elif defined(__DragonFly__) -+ return lwp_gettid(); -+#elif defined(__FreeBSD__) ++#elif defined(__DragonFly__) || defined(__FreeBSD__) + return pthread_getthreadid_np(); +#elif defined(__NetBSD__) + return _lwp_self(); diff --git a/devel/android-tools-adb/files/patch-libcutils_threads.cpp b/devel/android-tools-adb/files/patch-libcutils_threads.cpp index edba016ab32d..8f1fd7c7d456 100644 --- a/devel/android-tools-adb/files/patch-libcutils_threads.cpp +++ b/devel/android-tools-adb/files/patch-libcutils_threads.cpp @@ -1,12 +1,10 @@ --- libcutils/threads.cpp.orig 2018-07-13 19:58:45 UTC +++ libcutils/threads.cpp -@@ -24,11 +24,19 @@ +@@ -24,11 +24,17 @@ #include <sys/syscall.h> #include <sys/time.h> #include <unistd.h> -+#elif defined(__DragonFly__) -+#include <unistd.h> -+#elif defined(__FreeBSD__) ++#elif defined(__DragonFly__) || defined(__FreeBSD__) +#include <pthread_np.h> +#elif defined(__NetBSD__) +#include <lwp.h> @@ -20,13 +18,11 @@ #endif // No definition needed for Android because we'll just pick up bionic's copy. -@@ -38,10 +46,18 @@ pid_t gettid() { +@@ -38,10 +46,16 @@ pid_t gettid() { uint64_t tid; pthread_threadid_np(NULL, &tid); return tid; -+#elif defined(__DragonFly__) -+ return lwp_gettid(); -+#elif defined(__FreeBSD__) ++#elif defined(__DragonFly__) || defined(__FreeBSD__) + return pthread_getthreadid_np(); +#elif defined(__NetBSD__) + return _lwp_self(); |