summaryrefslogtreecommitdiff
path: root/devel/android-tools-fastboot/files/patch-base_logging.cpp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2017-08-22 13:01:20 +0000
committerJan Beich <jbeich@FreeBSD.org>2017-08-22 13:01:20 +0000
commit212056367b28056afc7702fbe11fef0d918cf928 (patch)
tree55352d2b91e51ca0f722cf9f1707bebdec74d38c /devel/android-tools-fastboot/files/patch-base_logging.cpp
parentUpdate to 4.0 (diff)
devel/android-tools-{adb,fastboot}: update to 8.0.0.r4 (oreo)
Changes: https://android.googlesource.com/platform/system/core/+log/android-7.1.2_r17..android-8.0.0_r4/adb Changes: https://android.googlesource.com/platform/system/core/+log/android-7.1.2_r17..android-8.0.0_r4/fastboot
Notes
Notes: svn path=/head/; revision=448522
Diffstat (limited to 'devel/android-tools-fastboot/files/patch-base_logging.cpp')
-rw-r--r--devel/android-tools-fastboot/files/patch-base_logging.cpp50
1 files changed, 50 insertions, 0 deletions
diff --git a/devel/android-tools-fastboot/files/patch-base_logging.cpp b/devel/android-tools-fastboot/files/patch-base_logging.cpp
new file mode 100644
index 000000000000..10b83f259680
--- /dev/null
+++ b/devel/android-tools-fastboot/files/patch-base_logging.cpp
@@ -0,0 +1,50 @@
+--- base/logging.cpp.orig 2016-08-08 21:10:17 UTC
++++ base/logging.cpp
+@@ -25,7 +25,7 @@
+ #include <time.h>
+
+ // For getprogname(3) or program_invocation_short_name.
+-#if defined(__ANDROID__) || defined(__APPLE__)
++#if !defined(_WIN32) && !defined(__GLIBC__)
+ #include <stdlib.h>
+ #elif defined(__GLIBC__)
+ #include <errno.h>
+@@ -35,6 +35,8 @@
+ #include <sys/uio.h>
+ #endif
+
++#include <cstring> // strrchr
++#include <cstdio> // fprintf
+ #include <iostream>
+ #include <limits>
+ #include <sstream>
+@@ -71,6 +72,14 @@
+ #include <unistd.h>
+ #elif defined(_WIN32)
+ #include <windows.h>
++#elif defined(__DragonFly__)
++#include <unistd.h>
++#elif defined(__FreeBSD__)
++#include <pthread_np.h>
++#elif defined(__NetBSD__)
++#include <lwp.h>
++#else
++#include <stdint.h>
+ #endif
+
+ #if defined(_WIN32)
+@@ -88,6 +97,14 @@ static thread_id GetThreadId() {
+ return syscall(__NR_gettid);
+ #elif defined(_WIN32)
+ return GetCurrentThreadId();
++#elif defined(__DragonFly__)
++ return lwp_gettid();
++#elif defined(__NetBSD__)
++ return _lwp_self();
++#elif defined(__FreeBSD__)
++ return pthread_getthreadid_np();
++#else
++ return (intptr_t) pthread_self();
+ #endif
+ }
+