Index: head/devel/android-tools-adb/Makefile =================================================================== --- head/devel/android-tools-adb/Makefile (revision 511279) +++ head/devel/android-tools-adb/Makefile (revision 511280) @@ -1,107 +1,85 @@ # $FreeBSD$ PORTNAME= android-tools-adb -DISTVERSIONPREFIX= android- -DISTVERSION?= 9.0.0_r3 -PORTREVISION?= 4 +DISTVERSIONPREFIX= platform-tools- +DISTVERSION?= 29.0.2 +PORTREVISION?= 0 CATEGORIES= devel comms MAINTAINER= jbeich@FreeBSD.org COMMENT= Android debug bridge command line tool LICENSE= APACHE20 USE_GITHUB= yes GH_ACCOUNT= aosp-mirror GH_PROJECT= platform_system_core CONFLICTS_INSTALL?= ${PORTNAME}-devel-* -USES= compiler:c++14-lang pkgconfig ssl uidfix +USES= compiler:c++17-lang pkgconfig ssl uidfix BUILD_WRKSRC= ${WRKSRC}/adb INSTALL_WRKSRC= ${BUILD_WRKSRC} TEST_WRKSRC= ${BUILD_WRKSRC} -CPPFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528 MAKEFILE?= ${.CURDIR}/files/Makefile MAKE_ENV= BINDIR="${PREFIX}/bin" FILESDIR="${DOCSDIR}" \ - VEREXT="${GH_REVISION}-android" + VERSION="${DISTVERSION}${DISTVERSIONSUFFIX}" ALL_TARGET= all TEST_TARGET= test PLIST_FILES= bin/adb PORTDOCS= * -# Generated by "make update-revision" for "adb --version" -GH_REVISION= ${DISTVERSIONSUFFIX:U0fac9018f238:S/-g//} - OPTIONS_DEFINE+=MDNSRESPONDER BASH DOCS TEST TEST_PYTHON OPTIONS_DEFAULT=MDNSRESPONDER OPTIONS_SUB= yes .if make(makesum) # for optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" .endif BASH_GH_ACCOUNT= mbrubeck:bashcomp BASH_GH_PROJECT= android-completion:bashcomp BASH_GH_TAGNAME= c1b0656:bashcomp BASH_PLIST_FILES= etc/bash_completion.d/adb BASH_VARS= LICENSE+=MIT LICENSE_COMB=multi DOCS_MAKE_ARGS_OFF= FILES="" FILESDIR="" MDNSRESPONDER_LIB_DEPENDS= libdns_sd.so:net/mDNSResponder MDNSRESPONDER_USES= localbase:ldflags MDNSRESPONDER_LDFLAGS= -ldns_sd MDNSRESPONDER_MAKE_ENV_OFF= MDNSEXT=_unsupported TEST_BUILD_DEPENDS+= googlemock>=1.6.0:devel/googlemock \ googletest>=1.6.0:devel/googletest TEST_ALL_TARGET= adb_test TEST_PYTHON_DESC= ${TEST_DESC:S/tests/python &/} TEST_PYTHON_GH_PROJECT= platform_development:development TEST_PYTHON_BUILD_DEPENDS=${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} TEST_PYTHON_USES= python:2.7,build post-patch: # XXX Hidden by poudriere/tinderbox, see lindev(4) for FreeBSD < 11.0 @if [ ! -e /dev/full ]; then \ ${REINPLACE_CMD} -e '/TEST/s/[^ ]*ENOSPC/DISABLED_&/' \ ${WRKSRC}/adb/adb_io_test.cpp; \ fi +# XXX getcwd fails and not connected upstream + @${REINPLACE_CMD} -e '/TEST/s/, /&DISABLED_/' \ + ${WRKSRC}/adb/bugreport_test.cpp pre-install-TEST-on: do-test pre-install-TEST_PYTHON-on: # XXX python tests may leave behind running adb server ${SETENV} PATH=${BUILD_WRKSRC}:${PATH} \ PYTHONPATH=${WRKSRC_development}/python-packages \ ${PYTHON_CMD} -m unittest discover -vs ${BUILD_WRKSRC} post-install-BASH-on: ${MKDIR} ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES:H} ${INSTALL_DATA} ${WRKSRC_bashcomp}/android \ ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES} -update-revision: - @${REINPLACE_CMD} -i '' -e "/^VERSION?=/s/=.*/= $$(\ - ${FETCH_CMD} -qo- \ - https://github.com/${GH_ACCOUNT}/platform_build/raw/${GH_TAGNAME}/core/version_defaults.mk | \ - ${SED} -n 's/^[[:space:]]*PLATFORM_SDK_VERSION := //p' \ - ).0.0-0 \$${VEREXT}/" \ - ${MAKEFILE} -# https://developer.github.com/v3/repos/commits/#get-a-single-commit -# Pretend to be curl(1) for pretty-printed JSON to help parse with sed(1) - @${REINPLACE_CMD} -i '' -e "/^GH_REVISION=/s/:U[^}:]*/:U$$(\ - ${SETENV} HTTP_USER_AGENT=curl ${FETCH_CMD} -qo- \ - https://api.github.com/repos/${GH_ACCOUNT}/${GH_PROJECT}/commits/${GH_TAGNAME} | \ - ${SED} -n '/sha/ { s/.*\"\([0-9a-f]\{12\}\).*/\1/p; q; }' \ - )/" \ - ${.CURDIR}/Makefile - .include - -# XXX Work around !target(makesum) -.ifndef DISTVERSIONSUFFIX -makesum: update-revision -.endif Index: head/devel/android-tools-adb/distinfo =================================================================== --- head/devel/android-tools-adb/distinfo (revision 511279) +++ head/devel/android-tools-adb/distinfo (revision 511280) @@ -1,7 +1,7 @@ -TIMESTAMP = 1529542722 -SHA256 (aosp-mirror-platform_system_core-android-9.0.0_r3_GH0.tar.gz) = b9de23465b304432aa2b585aa66c6bf4841b177f2139b75ca5adc5d917e0ecd6 -SIZE (aosp-mirror-platform_system_core-android-9.0.0_r3_GH0.tar.gz) = 27484684 +TIMESTAMP = 1563393249 +SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.2_GH0.tar.gz) = cd0f6fe386f07d7aef98cf46a41cef0aa1e8cebfe06f434bb5c88777de4c2643 +SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.2_GH0.tar.gz) = 59909027 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967 -SHA256 (aosp-mirror-platform_development-android-9.0.0_r3_GH0.tar.gz) = f35f681e6fad873f3e94b5c2362939741f15f276022717e352bd21a74653704b -SIZE (aosp-mirror-platform_development-android-9.0.0_r3_GH0.tar.gz) = 59064522 +SHA256 (aosp-mirror-platform_development-platform-tools-29.0.2_GH0.tar.gz) = aa40c37fd1cbb1c4a93a0c4ba26468bb47a5837826cb94423f5ca161dd85f118 +SIZE (aosp-mirror-platform_development-platform-tools-29.0.2_GH0.tar.gz) = 56861217 Index: head/devel/android-tools-adb/files/patch-adb_commandline.h =================================================================== --- head/devel/android-tools-adb/files/patch-adb_commandline.h (revision 511279) +++ head/devel/android-tools-adb/files/patch-adb_commandline.h (nonexistent) @@ -1,11 +0,0 @@ ---- adb/commandline.h.orig 2016-09-28 18:07:09 UTC -+++ adb/commandline.h -@@ -17,6 +17,8 @@ - #ifndef COMMANDLINE_H - #define COMMANDLINE_H - -+#include // fwrite -+ - #include "adb.h" - - // Callback used to handle the standard streams (stdout and stderr) sent by the Property changes on: head/devel/android-tools-adb/files/patch-adb_commandline.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_adb__io__test.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_adb__io__test.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-adb_adb__io__test.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- adb/adb_io_test.cpp.orig 2015-09-05 00:01:27 UTC -+++ adb/adb_io_test.cpp -@@ -18,6 +18,7 @@ - - #include - -+#include - #include - #include - #include Property changes on: head/devel/android-tools-adb/files/patch-adb_adb__io__test.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_sysdeps__test.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_sysdeps__test.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-adb_sysdeps__test.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- adb/sysdeps_test.cpp.orig 2017-06-27 22:39:52 UTC -+++ adb/sysdeps_test.cpp -@@ -19,6 +19,7 @@ - - #include - #include -+#include - #include - - #include "adb_io.h" Property changes on: head/devel/android-tools-adb/files/patch-adb_sysdeps__test.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_sysdeps_posix_network.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_sysdeps_posix_network.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-adb_sysdeps_posix_network.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- adb/sysdeps/posix/network.cpp.orig 2017-06-20 10:50:27 UTC -+++ adb/sysdeps/posix/network.cpp -@@ -17,6 +17,7 @@ - #include "sysdeps/network.h" - - #include -+#include // strerror - #include - #include - Property changes on: head/devel/android-tools-adb/files/patch-adb_sysdeps_posix_network.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-base_logging.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-base_logging.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-base_logging.cpp (nonexistent) @@ -1,54 +0,0 @@ ---- base/logging.cpp.orig 2016-08-08 21:10:17 UTC -+++ base/logging.cpp -@@ -25,7 +25,7 @@ - #include - - // For getprogname(3) or program_invocation_short_name. --#if defined(__ANDROID__) || defined(__APPLE__) -+#if !defined(_WIN32) && !defined(__GLIBC__) - #include - #elif defined(__GLIBC__) - #include -@@ -35,6 +35,8 @@ - #include - #endif - -+#include // strrchr -+#include // fprintf - #include - #include - #include -@@ -71,6 +72,16 @@ - #include - #elif defined(_WIN32) - #include -+#elif defined(__DragonFly__) || defined(__FreeBSD__) -+#include -+#elif defined(__NetBSD__) -+#include -+#elif defined(__OpenBSD__) -+#include -+#elif defined(__sun) -+#include -+#else // fallback -+#include - #endif - - #if defined(_WIN32) -@@ -88,6 +97,16 @@ static thread_id GetThreadId() { - return syscall(__NR_gettid); - #elif defined(_WIN32) - return GetCurrentThreadId(); -+#elif defined(__DragonFly__) || defined(__FreeBSD__) -+ return pthread_getthreadid_np(); -+#elif defined(__NetBSD__) -+ return _lwp_self(); -+#elif defined(__OpenBSD__) -+ return getthrid(); -+#elif defined(__sun) -+ return thr_self(); -+#else // fallback -+ return (intptr_t) pthread_self(); - #endif - } - Property changes on: head/devel/android-tools-adb/files/patch-base_logging.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-base_parsenetaddress.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-base_parsenetaddress.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-base_parsenetaddress.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- base/parsenetaddress.cpp.orig 2016-02-20 02:39:51 UTC -+++ base/parsenetaddress.cpp -@@ -16,6 +16,7 @@ - - #include "android-base/parsenetaddress.h" - -+#include // sscanf - #include - - #include "android-base/stringprintf.h" Property changes on: head/devel/android-tools-adb/files/patch-base_parsenetaddress.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_commandline.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_commandline.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-adb_commandline.cpp (nonexistent) @@ -1,24 +0,0 @@ ---- adb/commandline.cpp.orig 2015-06-17 22:20:38 UTC -+++ adb/commandline.cpp -@@ -637,7 +637,7 @@ static int ppp(int argc, const char** ar - - // copy args - ppp_args = (const char **) alloca(sizeof(char *) * argc + 1); -- ppp_args[0] = "pppd"; -+ ppp_args[0] = "ppp"; - for (i = 2 ; i < argc ; i++) { - //argv[2] and beyond become ppp_args[1] and beyond - ppp_args[i - 1] = argv[i]; -@@ -651,10 +651,10 @@ static int ppp(int argc, const char** ar - adb_close(STDERR_FILENO); - adb_close(fd); - -- err = execvp("pppd", (char * const *)ppp_args); -+ err = execvp("ppp", (char * const *)ppp_args); - - if (err < 0) { -- perror("execing pppd"); -+ perror("execing ppp"); - } - exit(-1); - } else { Property changes on: head/devel/android-tools-adb/files/patch-adb_commandline.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_fdevent__test.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_fdevent__test.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-adb_fdevent__test.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- adb/fdevent_test.cpp.orig 2015-09-17 22:58:36 UTC -+++ adb/fdevent_test.cpp -@@ -19,6 +19,7 @@ - #include - - #include -+#include // std::unique_ptr - #include - #include - #include Property changes on: head/devel/android-tools-adb/files/patch-adb_fdevent__test.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-base_stringprintf__test.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-base_stringprintf__test.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-base_stringprintf__test.cpp (nonexistent) @@ -1,10 +0,0 @@ ---- base/stringprintf_test.cpp.orig 2015-09-17 22:58:36 UTC -+++ base/stringprintf_test.cpp -@@ -18,6 +18,7 @@ - - #include - -+#include - #include - - TEST(StringPrintfTest, HexSizeT) { Property changes on: head/devel/android-tools-adb/files/patch-base_stringprintf__test.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-include_cutils_trace.h =================================================================== --- head/devel/android-tools-adb/files/patch-include_cutils_trace.h (revision 511279) +++ head/devel/android-tools-adb/files/patch-include_cutils_trace.h (nonexistent) @@ -1,17 +0,0 @@ ---- include/cutils/trace.h.orig 2017-06-20 10:50:27 UTC -+++ include/cutils/trace.h -@@ -18,8 +18,14 @@ - #define _LIBS_CUTILS_TRACE_H - - #include -+#ifdef __cplusplus -+#include -+using std::atomic_bool; -+using std::memory_order_acquire; -+#else - #include - #include -+#endif - #include - #include - #include Property changes on: head/devel/android-tools-adb/files/patch-include_cutils_trace.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp (nonexistent) @@ -1,43 +0,0 @@ ---- adb/adb_auth_host.cpp.orig 2016-06-29 23:43:15 UTC -+++ adb/adb_auth_host.cpp -@@ -34,7 +34,9 @@ - #include - #include - #include -+#if defined(OPENSSL_IS_BORINGSSL) - #include -+#endif - #include - #include - #include -@@ -70,6 +72,30 @@ static std::string get_user_info() { - return " " + username + "@" + hostname; - } - -+#if !defined(OPENSSL_IS_BORINGSSL) -+// https://boringssl.googlesource.com/boringssl/+/6601402%5E!/ -+static int EVP_EncodedLength(size_t *out_len, size_t len) { -+ if (len + 2 < len) { -+ return 0; -+ } -+ len += 2; -+ len /= 3; -+ -+ if (((len << 2) >> 2) != len) { -+ return 0; -+ } -+ len <<= 2; -+ -+ if (len + 1 < len) { -+ return 0; -+ } -+ len++; -+ -+ *out_len = len; -+ return 1; -+} -+#endif -+ - static bool write_public_keyfile(RSA* private_key, const std::string& private_key_path) { - uint8_t binary_key_data[ANDROID_PUBKEY_ENCODED_SIZE]; - if (!android_pubkey_encode(private_key, binary_key_data, sizeof(binary_key_data))) { Property changes on: head/devel/android-tools-adb/files/patch-adb_adb__auth__host.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-liblog_logger__write.c =================================================================== --- head/devel/android-tools-adb/files/patch-liblog_logger__write.c (revision 511279) +++ head/devel/android-tools-adb/files/patch-liblog_logger__write.c (nonexistent) @@ -1,16 +0,0 @@ ---- liblog/logger_write.c.orig 2016-04-16 00:01:39 UTC -+++ liblog/logger_write.c -@@ -15,12 +15,12 @@ - */ - - #include --#include - #include - #include - #include - - #ifdef __BIONIC__ -+#include - #include - #endif - Property changes on: head/devel/android-tools-adb/files/patch-liblog_logger__write.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/Makefile =================================================================== --- head/devel/android-tools-adb/files/Makefile (revision 511279) +++ head/devel/android-tools-adb/files/Makefile (revision 511280) @@ -1,151 +1,160 @@ # $FreeBSD$ PROG_CXX=adb NOMAN= # DragonFly, NetBSD, OpenBSD NO_MAN= # FreeBSD BINDIR?=/usr/bin FILESDIR?=${DOCDIR}/${PROG} -VERSION?= 28.0.0-0 ${VEREXT} FILES= OVERVIEW.TXT SERVICES.TXT SYNC.TXT protocol.txt SRCS+= adb.cpp -SRCS+= adb_auth_host.cpp -SRCS+= adb_client.cpp SRCS+= adb_io.cpp SRCS+= adb_listeners.cpp SRCS+= adb_trace.cpp SRCS+= adb_utils.cpp -SRCS+= bugreport.cpp -SRCS+= commandline.cpp -SRCS+= console.cpp -SRCS+= diagnose_usb.cpp -SRCS+= fdevent.cpp -SRCS+= file_sync_client.cpp -SRCS+= line_printer.cpp SRCS+= services.cpp SRCS+= shell_service_protocol.cpp SRCS+= socket_spec.cpp SRCS+= ../adb/sockets.cpp SRCS+= sysdeps_unix.cpp SRCS+= transport.cpp SRCS+= transport_local.cpp -SRCS+= transport_mdns${MDNSEXT}.cpp SRCS+= transport_usb.cpp TEST_SRCS+= adb_io_test.cpp TEST_SRCS+= adb_listeners_test.cpp TEST_SRCS+= adb_utils_test.cpp TEST_SRCS+= bugreport_test.cpp -TEST_SRCS+= fdevent_test.cpp TEST_SRCS+= shell_service_protocol_test.cpp TEST_SRCS+= socket_spec_test.cpp TEST_SRCS+= socket_test.cpp TEST_SRCS+= sysdeps_test.cpp TEST_SRCS+= transport_test.cpp +TEST_SRCS+= types_test.cpp .PATH: ${.CURDIR}/client +SRCS+= adb_client.cpp +SRCS+= adb_install.cpp +SRCS+= auth.cpp +SRCS+= bugreport.cpp +SRCS+= commandline.cpp +SRCS+= console.cpp +SRCS+= file_sync_client.cpp +SRCS+= line_printer.cpp SRCS+= main.cpp +SRCS+= transport_mdns${MDNSEXT}.cpp SRCS+= usb_libusb.cpp +.PATH: ${.CURDIR}/fdevent +SRCS+= fdevent.cpp +SRCS+= fdevent_poll.cpp +TEST_SRCS+= fdevent_test.cpp + .PATH: ${.CURDIR}/sysdeps SRCS+= errno.cpp TEST_SRCS+= stat_test.cpp .PATH: ${.CURDIR}/sysdeps/posix SRCS+= network.cpp .PATH: ${.CURDIR}/../base +SRCS+= chrono_utils.cpp SRCS+= file.cpp SRCS+= logging.cpp SRCS+= parsenetaddress.cpp SRCS+= quick_exit.cpp SRCS+= stringprintf.cpp SRCS+= strings.cpp TEST_SRCS+= file_test.cpp TEST_SRCS+= logging_test.cpp TEST_SRCS+= parsenetaddress_test.cpp TEST_SRCS+= quick_exit_test.cpp TEST_SRCS+= stringprintf_test.cpp TEST_SRCS+= strings_test.cpp TEST_SRCS+= test_main.cpp TEST_SRCS+= test_utils.cpp +.PATH: ${.CURDIR}/../diagnose_usb +SRCS+= diagnose_usb.cpp + .PATH: ${.CURDIR}/../libcrypto_utils SRCS+= android_pubkey.c .PATH: ${.CURDIR}/../libcrypto_utils/tests TEST_SRCS+= android_pubkey_test.cpp .PATH: ${.CURDIR}/../libcutils SRCS+= socket_inaddr_any_server_unix.cpp SRCS+= socket_local_client_unix.cpp SRCS+= socket_local_server_unix.cpp SRCS+= socket_network_client_unix.cpp SRCS+= ../libcutils/sockets.cpp SRCS+= load_file.cpp SRCS+= threads.cpp # DragonFly, NetBSD, OpenBSD CPPFLAGS.sockets.cpp+= -o ${.TARGET} # required by base/file.cpp .PATH: ${.CURDIR}/../liblog -SRCS+= config_read.c -SRCS+= config_write.c -SRCS+= fake_log_device.c -SRCS+= fake_writer.c -SRCS+= local_logger.c -SRCS+= logger_lock.c -SRCS+= logger_name.c -SRCS+= logger_write.c -SRCS+= logprint.c -SRCS+= stderr_write.c +SRCS+= config_read.cpp +SRCS+= config_write.cpp +SRCS+= fake_log_device.cpp +SRCS+= fake_writer.cpp +SRCS+= logger_lock.cpp +SRCS+= logger_name.cpp +SRCS+= logger_write.cpp +SRCS+= logprint.cpp +SRCS+= stderr_write.cpp -CPPFLAGS+= -DADB_VERSION="\"${VERSION}\"" +CPPFLAGS+= -DPLATFORM_TOOLS_VERSION="\"${VERSION:U0.0.0}\"" CPPFLAGS+= -DADB_HOST=1 CPPFLAGS+= -Doff64_t=off_t +CPPFLAGS+= -Dlseek64=lseek CPPFLAGS+= -DFAKE_LOG_DEVICE=1 CPPFLAGS+= -I${.CURDIR} +CPPFLAGS+= -I${.CURDIR}/client CPPFLAGS+= -I${.CURDIR}/../include CPPFLAGS+= -I${.CURDIR}/../base/include +CPPFLAGS+= -I${.CURDIR}/../diagnose_usb/include CPPFLAGS+= -I${.CURDIR}/../libcrypto_utils/include CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CPPFLAGS+= $$(${PKG_CONFIG} libcrypto --cflags 2>/dev/null) CPPFLAGS+= $$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null) -CXXFLAGS+= -std=gnu++14 +CXXFLAGS+= -std=gnu++2a .ifndef COMPILE.c CFLAGS+= ${CPPFLAGS} CXXFLAGS+= ${CPPFLAGS} .endif TEST_CPPFLAGS+= $$(${GTEST_CONFIG} --cppflags) TEST_CPPFLAGS+= $$(${GMOCK_CONFIG} --cppflags) .for f in ${TEST_SRCS} CPPFLAGS.${f}+= ${TEST_CPPFLAGS} .endfor LDADD+= $$(${PKG_CONFIG} libcrypto --libs 2>/dev/null || echo -lcrypto) LDADD+= $$(${PKG_CONFIG} libusb-1.0 --libs 2>/dev/null || echo -lusb) LDADD+= -lz \-lpthread DPADD+= ${LIBCRYPTO} ${LIBPTHREAD} ${LIBUSB} ${LIBZ} TEST_LDADD+= $$(${GTEST_CONFIG} --libs --ldflags) TEST_LDADD+= $$(${GMOCK_CONFIG} --libs --ldflags) TEST_OBJS+= ${TEST_SRCS:R:S/$/.o/} CLEANFILES+= ${PROG}_test ${TEST_OBJS} GTEST_CONFIG?= gtest-config GMOCK_CONFIG?= gmock-config PKG_CONFIG?= pkg-config beforeinstall: ${INSTALL} -d ${DESTDIR}${FILESDIR} .include test: ${PROG}_test @for f in ${.ALLSRC}; do ./$$f; done -${PROG}_test: ${OBJS:Nmain.o:Ncommandline.o} ${TEST_OBJS} +${PROG}_test: ${OBJS:Nmain.o:Nadb_install.o:Ncommandline.o} ${TEST_OBJS} ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${LDFLAGS} -o $@ $> ${LDADD} ${TEST_LDADD} Index: head/devel/android-tools-adb/files/patch-adb_adb.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_adb.cpp (nonexistent) +++ head/devel/android-tools-adb/files/patch-adb_adb.cpp (revision 511280) @@ -0,0 +1,22 @@ +--- adb/adb.cpp.orig 2019-07-17 19:54:09 UTC ++++ adb/adb.cpp +@@ -44,8 +44,19 @@ + #include + #include + #include ++#ifdef PLATFORM_TOOLS_VERSION ++#include ++namespace android { namespace build { ++std::string GetBuildNumber() { ++ struct utsname uts; ++ if (uname(&uts) == -1) ++ return "unknown"; ++ return uts.sysname; ++}}} ++#else + #include + #include ++#endif + + #include "adb_auth.h" + #include "adb_io.h" Property changes on: head/devel/android-tools-adb/files/patch-adb_adb.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_client_auth.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_client_auth.cpp (nonexistent) +++ head/devel/android-tools-adb/files/patch-adb_client_auth.cpp (revision 511280) @@ -0,0 +1,43 @@ +--- adb/client/auth.cpp.orig 2019-07-17 19:54:09 UTC ++++ adb/client/auth.cpp +@@ -34,7 +34,9 @@ + #include + #include + #include ++#if defined(OPENSSL_IS_BORINGSSL) + #include ++#endif + #include + #include + #include +@@ -52,6 +54,30 @@ static std::mutex& g_keys_mutex = *new std::mutex; + static std::map>& g_keys = + *new std::map>; + static std::map& g_monitored_paths = *new std::map; ++ ++#if !defined(OPENSSL_IS_BORINGSSL) ++// https://boringssl.googlesource.com/boringssl/+/6601402%5E!/ ++static int EVP_EncodedLength(size_t *out_len, size_t len) { ++ if (len + 2 < len) { ++ return 0; ++ } ++ len += 2; ++ len /= 3; ++ ++ if (((len << 2) >> 2) != len) { ++ return 0; ++ } ++ len <<= 2; ++ ++ if (len + 1 < len) { ++ return 0; ++ } ++ len++; ++ ++ *out_len = len; ++ return 1; ++} ++#endif + + static std::string get_user_info() { + std::string hostname; Property changes on: head/devel/android-tools-adb/files/patch-adb_client_auth.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp (nonexistent) +++ head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp (revision 511280) @@ -0,0 +1,28 @@ +--- adb/client/commandline.cpp.orig 2019-07-17 19:54:09 UTC ++++ adb/client/commandline.cpp +@@ -1016,7 +1016,11 @@ static int ppp(int argc, const char** argv) { + + // copy args + const char** ppp_args = (const char**)alloca(sizeof(char*) * argc + 1); ++#if defined(__DragonFly__) || defined(__FreeBSD__) ++ ppp_args[0] = "ppp"; ++#else + ppp_args[0] = "pppd"; ++#endif + for (i = 2 ; i < argc ; i++) { + //argv[2] and beyond become ppp_args[1] and beyond + ppp_args[i - 1] = argv[i]; +@@ -1028,8 +1032,13 @@ static int ppp(int argc, const char** argv) { + adb_close(STDERR_FILENO); + adb_close(fd); + ++#if defined(__DragonFly__) || defined(__FreeBSD__) ++ execvp("ppp", (char* const*)ppp_args); ++ perror_exit("exec ppp failed"); ++#else + execvp("pppd", (char* const*)ppp_args); + perror_exit("exec pppd failed"); ++#endif + } + + // parent side Property changes on: head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_fdevent_fdevent.h =================================================================== --- head/devel/android-tools-adb/files/patch-adb_fdevent_fdevent.h (nonexistent) +++ head/devel/android-tools-adb/files/patch-adb_fdevent_fdevent.h (revision 511280) @@ -0,0 +1,10 @@ +--- adb/fdevent/fdevent.h.orig 2019-07-17 19:54:09 UTC ++++ adb/fdevent/fdevent.h +@@ -20,6 +20,7 @@ + #include + #include + ++#include // std::atomic for GCC + #include + #include + #include Property changes on: head/devel/android-tools-adb/files/patch-adb_fdevent_fdevent.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_sysdeps.h =================================================================== --- head/devel/android-tools-adb/files/patch-adb_sysdeps.h (revision 511279) +++ head/devel/android-tools-adb/files/patch-adb_sysdeps.h (revision 511280) @@ -1,43 +1,27 @@ ---- adb/sysdeps.h.orig 2015-09-05 00:01:27 UTC +--- adb/sysdeps.h.orig 2019-07-17 19:54:09 UTC +++ adb/sysdeps.h -@@ -61,11 +61,13 @@ - #endif - #endif +@@ -330,6 +330,11 @@ size_t ParseCompleteUTF8(const char* first, const char --#ifdef _WIN32 -- -+#if !defined(__clang__) || __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 7) - // Clang-only nullability specifiers - #define _Nonnull - #define _Nullable -+#endif -+ -+#ifdef _WIN32 + #include - #include - #include -@@ -401,6 +401,11 @@ typedef std::unique_ptr - +#if defined(__Bitrig__) || defined(__DragonFly__) || \ + defined(__FreeBSD__) || defined(__OpenBSD__) +#include +#endif + #define OS_PATH_SEPARATORS "/" #define OS_PATH_SEPARATOR '/' #define OS_PATH_SEPARATOR_STR "/" -@@ -627,6 +632,12 @@ static __inline__ bool adb_thread_create +@@ -516,6 +521,12 @@ inline int adb_socket_get_local_port(borrowed_fd fd) { static __inline__ int adb_thread_setname(const std::string& name) { #ifdef __APPLE__ return pthread_setname_np(name.c_str()); +#elif defined(__Bitrig__) || defined(__DragonFly__) || \ + defined(__FreeBSD__) || defined(__OpenBSD__) + pthread_set_name_np(pthread_self(), name.c_str()); + return 0; +#elif defined(__NetBSD__) + return pthread_setname_np(pthread_self(), "%s", (void*)name.c_str()); #else - const char *s = name.c_str(); - + // Both bionic and glibc's pthread_setname_np fails rather than truncating long strings. + // glibc doesn't have strlcpy, so we have to fake it. Index: head/devel/android-tools-adb/files/patch-adb_transport__mdns__unsupported.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_transport__mdns__unsupported.cpp (nonexistent) +++ head/devel/android-tools-adb/files/patch-adb_transport__mdns__unsupported.cpp (revision 511280) @@ -0,0 +1,21 @@ +--- /dev/null 1970-01-01 00:00:00 UTC ++++ adb/transport_mdns_unsupported.cpp +@@ -0,0 +1,18 @@ ++/* ++ * Copyright (C) 2016 The Android Open Source Project ++ * ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++/* For when mDNS discovery is unsupported */ ++void init_mdns_transport_discovery(void) {} Property changes on: head/devel/android-tools-adb/files/patch-adb_transport__mdns__unsupported.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_types.h =================================================================== --- head/devel/android-tools-adb/files/patch-adb_types.h (nonexistent) +++ head/devel/android-tools-adb/files/patch-adb_types.h (revision 511280) @@ -0,0 +1,10 @@ +--- adb/types.h.orig 2019-07-17 19:54:09 UTC ++++ adb/types.h +@@ -16,6 +16,7 @@ + + #pragma once + ++#include // memcpy for GCC + #include + #include + #include Property changes on: head/devel/android-tools-adb/files/patch-adb_types.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-base_file.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-base_file.cpp (revision 511279) +++ head/devel/android-tools-adb/files/patch-base_file.cpp (revision 511280) @@ -1,47 +1,44 @@ ---- base/file.cpp.orig 2017-06-20 10:50:27 UTC +--- base/file.cpp.orig 2019-07-17 19:54:09 UTC +++ base/file.cpp -@@ -19,6 +19,10 @@ - #include +@@ -20,6 +20,7 @@ #include + #include #include -+#include // PATH_MAX -+#include // BUFSIZ -+#include // realpath -+#include // strerror - #include - #include - #include -@@ -36,6 +39,9 @@ ++#include // PATH_MAX for GCC + #include + #include + #include +@@ -35,6 +36,9 @@ #if defined(__APPLE__) #include #endif +#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) +#include +#endif #if defined(_WIN32) + #include #include - #define O_CLOEXEC O_NOINHERIT -@@ -251,6 +258,23 @@ std::string GetExecutablePath() { +@@ -421,6 +425,23 @@ std::string GetExecutablePath() { if (result == 0 || result == sizeof(path) - 1) return ""; path[PATH_MAX - 1] = 0; return path; +#elif defined(KERN_PROC_PATHNAME) + char path[PATH_MAX + 1]; + size_t path_len = sizeof(path); + int mib[] = { + CTL_KERN, +#if defined(__NetBSD__) + KERN_PROC_ARGS, + -1, + KERN_PROC_PATHNAME, +#else + KERN_PROC, + KERN_PROC_PATHNAME, + -1, +#endif + }; + int rc = sysctl(mib, arraysize(mib), path, &path_len, NULL, 0); + return rc ? "" : path; #else #error unknown OS #endif Index: head/devel/android-tools-adb/files/patch-base_include_android-base_logging.h =================================================================== --- head/devel/android-tools-adb/files/patch-base_include_android-base_logging.h (revision 511279) +++ head/devel/android-tools-adb/files/patch-base_include_android-base_logging.h (revision 511280) @@ -1,20 +1,22 @@ ---- base/include/android-base/logging.h.orig 2015-09-29 18:07:07 UTC +--- base/include/android-base/logging.h.orig 2019-07-17 19:54:09 UTC +++ base/include/android-base/logging.h -@@ -25,6 +25,8 @@ - #endif - #endif - -+#include -+ - #include - #include - #include -@@ -321,7 +321,7 @@ struct LogAbortAfterFullExpr { +@@ -350,7 +350,7 @@ struct LogAbortAfterFullExpr { // DCHECKs are debug variants of CHECKs only enabled in debug builds. Generally // CHECK should be used unless profiling identifies a CHECK as being in // performance critical code. -#if defined(NDEBUG) && !defined(__clang_analyzer__) +#if defined(NDEBUG) && !defined(__clang_analyzer__) || !defined(__ANDROID__) static constexpr bool kEnableDChecks = false; #else static constexpr bool kEnableDChecks = true; +@@ -486,8 +486,9 @@ namespace std { // NOLINT(cert-dcl58-cpp) + #pragma clang diagnostic ignored "-Wgcc-compat" + #define OSTREAM_STRING_POINTER_USAGE_WARNING \ + __attribute__((diagnose_if(true, "Unexpected logging of string pointer", "warning"))) ++OSTREAM_STRING_POINTER_USAGE_WARNING // GCC + inline std::ostream& operator<<(std::ostream& stream, const std::string* string_pointer) +- OSTREAM_STRING_POINTER_USAGE_WARNING { ++{ + return stream << static_cast(string_pointer); + } + #pragma clang diagnostic pop Index: head/devel/android-tools-adb/files/patch-base_include_android-base_thread__annotations.h =================================================================== --- head/devel/android-tools-adb/files/patch-base_include_android-base_thread__annotations.h (nonexistent) +++ head/devel/android-tools-adb/files/patch-base_include_android-base_thread__annotations.h (revision 511280) @@ -0,0 +1,14 @@ +--- base/include/android-base/thread_annotations.h.orig 2019-07-17 19:54:09 UTC ++++ base/include/android-base/thread_annotations.h +@@ -18,7 +18,11 @@ + + #include + ++#ifdef __clang__ + #define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) ++#else ++#define THREAD_ANNOTATION_ATTRIBUTE__(x) ++#endif + + #define CAPABILITY(x) \ + THREAD_ANNOTATION_ATTRIBUTE__(capability(x)) Property changes on: head/devel/android-tools-adb/files/patch-base_include_android-base_thread__annotations.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-base_threads.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-base_threads.cpp (nonexistent) +++ head/devel/android-tools-adb/files/patch-base_threads.cpp (revision 511280) @@ -0,0 +1,36 @@ +--- base/threads.cpp.orig 2019-07-17 19:54:09 UTC ++++ base/threads.cpp +@@ -25,6 +25,16 @@ + #include + #elif defined(_WIN32) + #include ++#elif defined(__DragonFly__) || defined(__FreeBSD__) ++#include ++#elif defined(__NetBSD__) ++#include ++#elif defined(__OpenBSD__) ++#include ++#elif defined(__sun) ++#include ++#else // fallback ++#include + #endif + + namespace android { +@@ -41,6 +51,16 @@ uint64_t GetThreadId() { + return syscall(__NR_gettid); + #elif defined(_WIN32) + return GetCurrentThreadId(); ++#elif defined(__DragonFly__) || defined(__FreeBSD__) ++ return pthread_getthreadid_np(); ++#elif defined(__NetBSD__) ++ return _lwp_self(); ++#elif defined(__OpenBSD__) ++ return getthrid(); ++#elif defined(__sun) ++ return thr_self(); ++#else // fallback ++ return (intptr_t) pthread_self(); + #endif + } + Property changes on: head/devel/android-tools-adb/files/patch-base_threads.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-libcutils_include_cutils_trace.h =================================================================== --- head/devel/android-tools-adb/files/patch-libcutils_include_cutils_trace.h (nonexistent) +++ head/devel/android-tools-adb/files/patch-libcutils_include_cutils_trace.h (revision 511280) @@ -0,0 +1,17 @@ +--- libcutils/include/cutils/trace.h.orig 2019-07-17 19:54:09 UTC ++++ libcutils/include/cutils/trace.h +@@ -18,8 +18,14 @@ + #define _LIBS_CUTILS_TRACE_H + + #include ++#ifdef __cplusplus ++#include ++using std::atomic_bool; ++using std::memory_order_acquire; ++#else + #include + #include ++#endif + #include + #include + #include Property changes on: head/devel/android-tools-adb/files/patch-libcutils_include_cutils_trace.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-liblog_fake__writer.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-liblog_fake__writer.cpp (nonexistent) +++ head/devel/android-tools-adb/files/patch-liblog_fake__writer.cpp (revision 511280) @@ -0,0 +1,12 @@ +--- liblog/fake_writer.cpp.orig 2019-07-17 19:54:09 UTC ++++ liblog/fake_writer.cpp +@@ -33,8 +33,8 @@ static int logFds[(int)LOG_ID_MAX] = {-1, -1, -1, -1, + + struct android_log_transport_write fakeLoggerWrite = { + .node = {&fakeLoggerWrite.node, &fakeLoggerWrite.node}, +- .context.priv = &logFds, + .name = "fake", ++ .context = { .priv = &logFds }, // GCC + .available = NULL, + .open = fakeOpen, + .close = fakeClose, Property changes on: head/devel/android-tools-adb/files/patch-liblog_fake__writer.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-liblog_logger.h =================================================================== --- head/devel/android-tools-adb/files/patch-liblog_logger.h (nonexistent) +++ head/devel/android-tools-adb/files/patch-liblog_logger.h (revision 511280) @@ -0,0 +1,17 @@ +--- liblog/logger.h.orig 2019-07-17 19:54:09 UTC ++++ liblog/logger.h +@@ -16,8 +16,14 @@ + + #pragma once + ++#ifdef __cplusplus ++#include ++using std::atomic_int; ++using std::atomic_uintptr_t; ++#else + #include + #include ++#endif + + #include + #include Property changes on: head/devel/android-tools-adb/files/patch-liblog_logger.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-liblog_logger__write.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-liblog_logger__write.cpp (nonexistent) +++ head/devel/android-tools-adb/files/patch-liblog_logger__write.cpp (revision 511280) @@ -0,0 +1,17 @@ +--- liblog/logger_write.cpp.orig 2019-07-17 19:54:09 UTC ++++ liblog/logger_write.cpp +@@ -15,12 +15,12 @@ + */ + + #include +-#include + #include + #include + #include + +-#ifdef __BIONIC__ ++#if defined(__ANDROID__) ++#include + #include + #endif + Property changes on: head/devel/android-tools-adb/files/patch-liblog_logger__write.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-liblog_stderr__write.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-liblog_stderr__write.cpp (nonexistent) +++ head/devel/android-tools-adb/files/patch-liblog_stderr__write.cpp (revision 511280) @@ -0,0 +1,12 @@ +--- liblog/stderr_write.cpp.orig 2019-07-17 19:54:09 UTC ++++ liblog/stderr_write.cpp +@@ -56,8 +56,8 @@ struct stderrContext { + + struct android_log_transport_write stderrLoggerWrite = { + .node = {&stderrLoggerWrite.node, &stderrLoggerWrite.node}, +- .context.priv = NULL, + .name = "stderr", ++ .context = { .priv = NULL }, // GCC + .available = stderrAvailable, + .open = stderrOpen, + .close = stderrClose, Property changes on: head/devel/android-tools-adb/files/patch-liblog_stderr__write.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property