Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Oct 2019 18:04:19 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r516023 - in head/devel: android-tools-adb android-tools-adb/files android-tools-fastboot android-tools-fastboot/files
Message-ID:  <201910291804.x9TI4JaV035681@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Oct 29 18:04:18 2019
New Revision: 516023
URL: https://svnweb.freebsd.org/changeset/ports/516023

Log:
  devel/android-tools-{adb,fastboot}: update to 29.0.5
  
  Changes:	https://android.googlesource.com/platform/system/core/+log/platform-tools-29.0.4..platform-tools-29.0.5/adb
  Changes:	https://android.googlesource.com/platform/system/core/+log/platform-tools-29.0.4..platform-tools-29.0.5/fastboot
  Reported by:	portscout

Added:
  head/devel/android-tools-adb/files/extra-patch-revert-d3d650628c8c   (contents, props changed)
  head/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h   (contents, props changed)
Deleted:
  head/devel/android-tools-fastboot/files/patch-liblog_stderr__write.cpp
Modified:
  head/devel/android-tools-adb/Makefile   (contents, props changed)
  head/devel/android-tools-adb/distinfo   (contents, props changed)
  head/devel/android-tools-adb/files/Makefile   (contents, props changed)
  head/devel/android-tools-adb/files/patch-adb_client_adb__install.cpp   (contents, props changed)
  head/devel/android-tools-adb/files/patch-adb_client_auth.cpp   (contents, props changed)
  head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp   (contents, props changed)
  head/devel/android-tools-fastboot/Makefile   (contents, props changed)
  head/devel/android-tools-fastboot/distinfo   (contents, props changed)
  head/devel/android-tools-fastboot/files/Makefile   (contents, props changed)
  head/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp   (contents, props changed)
  head/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp   (contents, props changed)

Modified: head/devel/android-tools-adb/Makefile
==============================================================================
--- head/devel/android-tools-adb/Makefile	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-adb/Makefile	Tue Oct 29 18:04:18 2019	(r516023)
@@ -2,7 +2,7 @@
 
 PORTNAME=	android-tools-adb
 DISTVERSIONPREFIX=	platform-tools-
-DISTVERSION?=	29.0.4
+DISTVERSION?=	29.0.5
 PORTREVISION?=	0
 CATEGORIES=	devel comms
 
@@ -27,6 +27,12 @@ ALL_TARGET=	all
 TEST_TARGET=	test
 PLIST_FILES=	bin/adb
 PORTDOCS=	*
+
+# XXX Remove after FreeBSD 11.2/12.0 reach EOL i.e., around 2020-02-01
+# XXX Switch to bundled libc++ to avoid error-prone reverts
+.if !exists(/usr/include/c++/v1/charconv) && exists(/usr/lib/libc++.so)
+EXTRA_PATCHES+=	${PATCHDIR}/extra-patch-revert-d3d650628c8c
+.endif
 
 OPTIONS_DEFINE+=MDNSRESPONDER BASH DOCS TEST TEST_PYTHON
 OPTIONS_DEFAULT=MDNSRESPONDER

Modified: head/devel/android-tools-adb/distinfo
==============================================================================
--- head/devel/android-tools-adb/distinfo	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-adb/distinfo	Tue Oct 29 18:04:18 2019	(r516023)
@@ -1,7 +1,7 @@
-TIMESTAMP = 1568309901
-SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.4_GH0.tar.gz) = 95e20a50253d82b2d5f96b1acd2672c3fbdb57908e44757ba76a25d5d56a4f64
-SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.4_GH0.tar.gz) = 61253830
+TIMESTAMP = 1571358141
+SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.5_GH0.tar.gz) = a89ed6195862578acc01092e8ca390cd7578725bca9eed77b6b730f334b4c255
+SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.5_GH0.tar.gz) = 68752941
 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c
 SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967
-SHA256 (aosp-mirror-platform_development-platform-tools-29.0.4_GH0.tar.gz) = f2dc2264e17be1ce5bd3311d9c4720fa20fa614ece6449b5235d33cdf0fc51e1
-SIZE (aosp-mirror-platform_development-platform-tools-29.0.4_GH0.tar.gz) = 56857949
+SHA256 (aosp-mirror-platform_development-platform-tools-29.0.5_GH0.tar.gz) = 6975dbe199d76f375a4da5b945be1e389611906420f40b3c5c961a33929d2443
+SIZE (aosp-mirror-platform_development-platform-tools-29.0.5_GH0.tar.gz) = 63881721

Modified: head/devel/android-tools-adb/files/Makefile
==============================================================================
--- head/devel/android-tools-adb/files/Makefile	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-adb/files/Makefile	Tue Oct 29 18:04:18 2019	(r516023)
@@ -96,6 +96,8 @@ CPPFLAGS+= -DPLATFORM_TOOLS_VERSION="\"${VERSION:U0.0.
 CPPFLAGS+= -DADB_HOST=1
 CPPFLAGS+= -Doff64_t=off_t
 CPPFLAGS+= -Dlseek64=lseek
+CPPFLAGS+= -Dpread64=pread
+CPPFLAGS+= -Dpwrite64=pwrite
 CPPFLAGS+= -I${.CURDIR}
 CPPFLAGS+= -I${.CURDIR}/client
 CPPFLAGS+= -I${.CURDIR}/../include

Added: head/devel/android-tools-adb/files/extra-patch-revert-d3d650628c8c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/android-tools-adb/files/extra-patch-revert-d3d650628c8c	Tue Oct 29 18:04:18 2019	(r516023)
@@ -0,0 +1,56 @@
+In file included from adb_utils.cpp:19:
+adb/adb_utils.h:19:10: fatal error: 'charconv' file not found
+#include <charconv>
+         ^~~~~~~~~~
+
+--- adb/adb_utils.h.orig	2019-10-18 00:22:21 UTC
++++ adb/adb_utils.h
+@@ -16,7 +16,6 @@
+ 
+ #pragma once
+ 
+-#include <charconv>
+ #include <condition_variable>
+ #include <mutex>
+ #include <string>
+@@ -113,17 +112,33 @@ inline std::string_view StripTrailingNulls(std::string
+ // Base-10 stroll on a string_view.
+ template <typename T>
+ inline bool ParseUint(T* result, std::string_view str, std::string_view* remaining = nullptr) {
+-    T value;
+-    const auto res = std::from_chars(str.begin(), str.end(), value);
+-    if (res.ec != std::errc{}) {
++    if (str.empty() || !isdigit(str[0])) {
+         return false;
+     }
+-    if (res.ptr != str.end() && !remaining) {
+-        return false;
++
++    T value = 0;
++    std::string_view::iterator it;
++    constexpr T max = std::numeric_limits<T>::max();
++    for (it = str.begin(); it != str.end() && isdigit(*it); ++it) {
++        if (value > max / 10) {
++            return false;
++        }
++
++        value *= 10;
++
++        T digit = *it - '0';
++        if (value > max - digit) {
++            return false;
++        }
++
++        value += digit;
+     }
++    *result = value;
+     if (remaining) {
+-        *remaining = std::string_view(res.ptr, str.end() - res.ptr);
++        *remaining = str.substr(it - str.begin());
++    } else {
++      return it == str.end();
+     }
+-    *result = value;
++
+     return true;
+ }

Modified: head/devel/android-tools-adb/files/patch-adb_client_adb__install.cpp
==============================================================================
--- head/devel/android-tools-adb/files/patch-adb_client_adb__install.cpp	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-adb/files/patch-adb_client_adb__install.cpp	Tue Oct 29 18:04:18 2019	(r516023)
@@ -1,11 +1,105 @@
---- adb/client/adb_install.cpp.orig	2019-08-13 02:10:58 UTC
+--- adb/client/adb_install.cpp.orig	2019-10-18 00:22:21 UTC
 +++ adb/client/adb_install.cpp
-@@ -214,7 +214,7 @@ static int install_app_streamed(int argc, const char**
-             return 1;
+@@ -35,9 +35,11 @@
+ #include "adb_utils.h"
+ #include "client/file_sync_client.h"
+ #include "commandline.h"
++#if defined(ENABLE_FASTDEPLOY)
+ #include "fastdeploy.h"
+ 
+ static constexpr int kFastDeployMinApi = 24;
++#endif
+ 
+ namespace {
+ 
+@@ -167,6 +169,7 @@ static int install_app_streamed(int argc, const char**
+     }
+ 
+     if (use_fastdeploy) {
++#if defined(ENABLE_FASTDEPLOY)
+         auto metadata = extract_metadata(file);
+         if (metadata.has_value()) {
+             // pass all but 1st (command) and last (apk path) parameters through to pm for
+@@ -175,6 +178,9 @@ static int install_app_streamed(int argc, const char**
+             auto patchFd = install_patch(pm_args.size(), pm_args.data());
+             return stream_patch(file, std::move(metadata.value()), std::move(patchFd));
          }
++#else
++        error_exit("fastdeploy is disabled");
++#endif
+     }
  
+     struct stat sb;
+@@ -189,7 +195,7 @@ static int install_app_streamed(int argc, const char**
+         return 1;
+     }
+ 
 -#ifdef __linux__
 +#if !defined(__APPLE__) && !defined(_WIN32)
-         posix_fadvise(local_fd.get(), 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE);
+     posix_fadvise(local_fd.get(), 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE);
  #endif
  
+@@ -263,6 +269,7 @@ static int install_app_legacy(int argc, const char** a
+     argv[last_apk] = apk_dest.c_str(); /* destination name, not source location */
+ 
+     if (use_fastdeploy) {
++#if defined(ENABLE_FASTDEPLOY)
+         auto metadata = extract_metadata(apk_file[0]);
+         if (metadata.has_value()) {
+             auto patchFd = apply_patch_on_device(apk_dest.c_str());
+@@ -273,6 +280,9 @@ static int install_app_legacy(int argc, const char** a
+ 
+             return status;
+         }
++#else
++        error_exit("fastdeploy is disabled");
++#endif
+     }
+ 
+     if (do_sync_push(apk_file, apk_dest.c_str(), false)) {
+@@ -288,7 +298,9 @@ int install_app(int argc, const char** argv) {
+     InstallMode installMode = INSTALL_DEFAULT;
+     bool use_fastdeploy = false;
+     bool is_reinstall = false;
++#if defined(ENABLE_FASTDEPLOY)
+     FastDeploy_AgentUpdateStrategy agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
++#endif
+ 
+     for (int i = 1; i < argc; i++) {
+         if (!strcmp(argv[i], "--streaming")) {
+@@ -309,13 +321,19 @@ int install_app(int argc, const char** argv) {
+             use_fastdeploy = false;
+         } else if (!strcmp(argv[i], "--force-agent")) {
+             processedArgIndicies.push_back(i);
++#if defined(ENABLE_FASTDEPLOY)
+             agent_update_strategy = FastDeploy_AgentUpdateAlways;
++#endif
+         } else if (!strcmp(argv[i], "--date-check-agent")) {
+             processedArgIndicies.push_back(i);
++#if defined(ENABLE_FASTDEPLOY)
+             agent_update_strategy = FastDeploy_AgentUpdateNewerTimeStamp;
++#endif
+         } else if (!strcmp(argv[i], "--version-check-agent")) {
+             processedArgIndicies.push_back(i);
++#if defined(ENABLE_FASTDEPLOY)
+             agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
++#endif
+         }
+     }
+ 
+@@ -327,6 +345,7 @@ int install_app(int argc, const char** argv) {
+         error_exit("Attempting to use streaming install on unsupported device");
+     }
+ 
++#if defined(ENABLE_FASTDEPLOY)
+     if (use_fastdeploy && get_device_api_level() < kFastDeployMinApi) {
+         printf("Fast Deploy is only compatible with devices of API version %d or higher, "
+                "ignoring.\n",
+@@ -334,6 +353,7 @@ int install_app(int argc, const char** argv) {
+         use_fastdeploy = false;
+     }
+     fastdeploy_set_agent_update_strategy(agent_update_strategy);
++#endif
+ 
+     std::vector<const char*> passthrough_argv;
+     for (int i = 0; i < argc; i++) {

Modified: head/devel/android-tools-adb/files/patch-adb_client_auth.cpp
==============================================================================
--- head/devel/android-tools-adb/files/patch-adb_client_auth.cpp	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-adb/files/patch-adb_client_auth.cpp	Tue Oct 29 18:04:18 2019	(r516023)
@@ -1,16 +1,17 @@
---- adb/client/auth.cpp.orig	2019-07-17 19:54:09 UTC
+--- adb/client/auth.cpp.orig	2019-10-18 00:22:21 UTC
 +++ adb/client/auth.cpp
-@@ -34,7 +34,9 @@
+@@ -34,7 +34,10 @@
  #include <android-base/stringprintf.h>
  #include <android-base/strings.h>
  #include <crypto_utils/android_pubkey.h>
 +#if defined(OPENSSL_IS_BORINGSSL)
  #include <openssl/base64.h>
 +#endif
++#include <openssl/err.h>
  #include <openssl/evp.h>
  #include <openssl/objects.h>
  #include <openssl/pem.h>
-@@ -52,6 +54,30 @@ static std::mutex& g_keys_mutex = *new std::mutex;
+@@ -52,6 +55,30 @@ static std::mutex& g_keys_mutex = *new std::mutex;
  static std::map<std::string, std::shared_ptr<RSA>>& g_keys =
      *new std::map<std::string, std::shared_ptr<RSA>>;
  static std::map<int, std::string>& g_monitored_paths = *new std::map<int, std::string>;

Modified: head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp
==============================================================================
--- head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp	Tue Oct 29 18:04:18 2019	(r516023)
@@ -1,6 +1,16 @@
---- adb/client/commandline.cpp.orig	2019-07-17 19:54:09 UTC
+--- adb/client/commandline.cpp.orig	2019-10-18 00:22:21 UTC
 +++ adb/client/commandline.cpp
-@@ -1016,7 +1016,11 @@ static int ppp(int argc, const char** argv) {
+@@ -59,7 +59,9 @@
+ #include "bugreport.h"
+ #include "client/file_sync_client.h"
+ #include "commandline.h"
++#if defined(ENABLE_FASTDEPLOY)
+ #include "fastdeploy.h"
++#endif
+ #include "services.h"
+ #include "shell_protocol.h"
+ #include "sysdeps/chrono.h"
+@@ -1012,7 +1014,11 @@ static int ppp(int argc, const char** argv) {
  
          // copy args
          const char** ppp_args = (const char**)alloca(sizeof(char*) * argc + 1);
@@ -12,7 +22,7 @@
          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) {
+@@ -1024,8 +1030,13 @@ static int ppp(int argc, const char** argv) {
          adb_close(STDERR_FILENO);
          adb_close(fd);
  

Modified: head/devel/android-tools-fastboot/Makefile
==============================================================================
--- head/devel/android-tools-fastboot/Makefile	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-fastboot/Makefile	Tue Oct 29 18:04:18 2019	(r516023)
@@ -2,7 +2,7 @@
 
 PORTNAME=	android-tools-fastboot
 DISTVERSIONPREFIX=	platform-tools-
-DISTVERSION?=	29.0.4
+DISTVERSION?=	29.0.5
 PORTREVISION?=	0
 CATEGORIES=	devel sysutils
 MASTER_SITES=	https://salsa.debian.org/android-tools-team/android-tools/raw/706e754/debian/:manpage
@@ -17,6 +17,7 @@ LICENSE_COMB=	multi
 
 USE_GITHUB=	yes
 GH_TUPLE=	aosp-mirror:platform_system_core:${DISTVERSIONFULL} \
+		jbeich:platform_external_avb:${DISTVERSIONFULL}:avb/avb \
 		jbeich:platform_system_extras:${DISTVERSIONFULL}:extras/extras \
 		jbeich:platform_system_tools_mkbootimg:${DISTVERSIONFULL}:mkbootimg/mkbootimg
 

Modified: head/devel/android-tools-fastboot/distinfo
==============================================================================
--- head/devel/android-tools-fastboot/distinfo	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-fastboot/distinfo	Tue Oct 29 18:04:18 2019	(r516023)
@@ -1,11 +1,13 @@
-TIMESTAMP = 1568309901
+TIMESTAMP = 1571358141
 SHA256 (fastboot.1) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283
 SIZE (fastboot.1) = 5906
-SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.4_GH0.tar.gz) = 95e20a50253d82b2d5f96b1acd2672c3fbdb57908e44757ba76a25d5d56a4f64
-SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.4_GH0.tar.gz) = 61253830
-SHA256 (jbeich-platform_system_extras-platform-tools-29.0.4_GH0.tar.gz) = b273a90d91132732b1fa77df273ee219cdafa0f71b000350d406d720a1b59fda
-SIZE (jbeich-platform_system_extras-platform-tools-29.0.4_GH0.tar.gz) = 210790487
-SHA256 (jbeich-platform_system_tools_mkbootimg-platform-tools-29.0.4_GH0.tar.gz) = 743b5cbcacbc635238f7113c8ddcab212729e7abbbf50816b389b7a4a6442970
-SIZE (jbeich-platform_system_tools_mkbootimg-platform-tools-29.0.4_GH0.tar.gz) = 6619
+SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.5_GH0.tar.gz) = a89ed6195862578acc01092e8ca390cd7578725bca9eed77b6b730f334b4c255
+SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.5_GH0.tar.gz) = 68752941
+SHA256 (jbeich-platform_external_avb-platform-tools-29.0.5_GH0.tar.gz) = 276c9b656f99dbf80a0fd8e06bdbdcf5d24916902e3b215b18b24cad858be5bc
+SIZE (jbeich-platform_external_avb-platform-tools-29.0.5_GH0.tar.gz) = 797490
+SHA256 (jbeich-platform_system_extras-platform-tools-29.0.5_GH0.tar.gz) = 5183a633aec89474cbe0c53875983e7719436e106a4a7aa1e9097a93bb8a3883
+SIZE (jbeich-platform_system_extras-platform-tools-29.0.5_GH0.tar.gz) = 276210581
+SHA256 (jbeich-platform_system_tools_mkbootimg-platform-tools-29.0.5_GH0.tar.gz) = 772b13294ffcab508ad27461e1bdcb1ce3d95bacf10ed2191f62b2493e1b6aed
+SIZE (jbeich-platform_system_tools_mkbootimg-platform-tools-29.0.5_GH0.tar.gz) = 12180
 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c
 SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967

Modified: head/devel/android-tools-fastboot/files/Makefile
==============================================================================
--- head/devel/android-tools-fastboot/files/Makefile	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-fastboot/files/Makefile	Tue Oct 29 18:04:18 2019	(r516023)
@@ -59,15 +59,12 @@ CPPFLAGS.sockets.cpp+=	-o ${.TARGET}
 
 # required by base and libutils
 .PATH:	${.CURDIR}/../liblog
-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
 
 # required by fastboot
 .PATH:	${.CURDIR}/../libsparse
@@ -91,13 +88,14 @@ CPPFLAGS+=	-Dpread64=pread
 CPPFLAGS+=	-DFAKE_LOG_DEVICE=1
 CPPFLAGS+=	-I${.CURDIR}
 CPPFLAGS+=	-I${.CURDIR}/../include
-CPPFLAGS+=	-I${.CURDIR}/../mkbootimg/include/bootimg
+CPPFLAGS+=	-I${.CURDIR}/../avb
 CPPFLAGS+=	-I${.CURDIR}/../base/include
 CPPFLAGS+=	-I${.CURDIR}/../diagnose_usb/include
 CPPFLAGS+=	-I${.CURDIR}/../extras/ext4_utils/include
 CPPFLAGS+=	-I${.CURDIR}/../fs_mgr/liblp/include
 CPPFLAGS+=	-I${.CURDIR}/../libsparse/include
 CPPFLAGS+=	-I${.CURDIR}/../libziparchive/include
+CPPFLAGS+=	-I${.CURDIR}/../mkbootimg/include/bootimg
 CPPFLAGS+=	${CPPFLAGS.${.IMPSRC:T}}
 CPPFLAGS+=	$$(${PKG_CONFIG} libcrypto --cflags 2>/dev/null)
 CPPFLAGS+=	$$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null)

Added: head/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h	Tue Oct 29 18:04:18 2019	(r516023)
@@ -0,0 +1,58 @@
+--- base/include/android-base/endian.h.orig	2019-10-18 00:22:21 UTC
++++ base/include/android-base/endian.h
+@@ -50,6 +50,8 @@
+ #if defined(__APPLE__)
+ /* macOS has some of the basics. */
+ #include <sys/_endian.h>
++#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#include <sys/endian.h>
+ #else
+ /* Windows has some of the basics as well. */
+ #include <sys/param.h>
+@@ -71,22 +73,39 @@
+ 
+ #define ntohq(x) __builtin_bswap64(x)
+ 
++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+ #define htobe16(x) __builtin_bswap16(x)
+ #define htobe32(x) __builtin_bswap32(x)
+ #define htobe64(x) __builtin_bswap64(x)
++#endif
+ 
++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#define betoh16(x) be16toh(x)
++#define betoh32(x) be32toh(x)
++#define betoh64(x) be64toh(x)
++#else
+ #define betoh16(x) __builtin_bswap16(x)
+ #define betoh32(x) __builtin_bswap32(x)
+ #define betoh64(x) __builtin_bswap64(x)
++#endif
+ 
++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+ #define htole16(x) (x)
+ #define htole32(x) (x)
+ #define htole64(x) (x)
++#endif
+ 
++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
++#define letoh16(x) le16toh(x)
++#define letoh32(x) le32toh(x)
++#define letoh64(x) le64toh(x)
++#else
+ #define letoh16(x) (x)
+ #define letoh32(x) (x)
+ #define letoh64(x) (x)
++#endif
+ 
++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
+ #define be16toh(x) __builtin_bswap16(x)
+ #define be32toh(x) __builtin_bswap32(x)
+ #define be64toh(x) __builtin_bswap64(x)
+@@ -94,5 +113,6 @@
+ #define le16toh(x) (x)
+ #define le32toh(x) (x)
+ #define le64toh(x) (x)
++#endif
+ 
+ #endif

Modified: head/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp
==============================================================================
--- head/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp	Tue Oct 29 18:04:18 2019	(r516023)
@@ -1,6 +1,6 @@
---- fastboot/fastboot.cpp.orig	2019-08-13 02:10:58 UTC
+--- fastboot/fastboot.cpp.orig	2019-10-18 00:22:21 UTC
 +++ fastboot/fastboot.cpp
-@@ -58,9 +58,20 @@
+@@ -59,10 +59,21 @@
  #include <android-base/stringprintf.h>
  #include <android-base/strings.h>
  #include <android-base/unique_fd.h>
@@ -15,10 +15,11 @@
 +}}}
 +#else
  #include <build/version.h>
--#include <liblp/liblp.h>
- #include <platform_tools_version.h>
++#include <platform_tools_version.h>
 +#endif
-+#include <liblp/liblp.h>
+ #include <libavb/libavb.h>
+ #include <liblp/liblp.h>
+-#include <platform_tools_version.h>
  #include <sparse/sparse.h>
  #include <ziparchive/zip_archive.h>
  

Modified: head/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp
==============================================================================
--- head/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp	Tue Oct 29 16:02:48 2019	(r516022)
+++ head/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp	Tue Oct 29 18:04:18 2019	(r516023)
@@ -1,12 +1,11 @@
---- liblog/fake_writer.cpp.orig	2019-07-17 19:54:09 UTC
+--- liblog/fake_writer.cpp.orig	2019-10-18 00:22:21 UTC
 +++ liblog/fake_writer.cpp
-@@ -33,8 +33,8 @@ static int logFds[(int)LOG_ID_MAX] = {-1, -1, -1, -1, 
- 
+@@ -34,7 +34,7 @@ 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",
+     .logMask = 0,
+-    .context.priv = &logFds,
 +    .context = { .priv = &logFds }, // GCC
-     .available = NULL,
+     .available = fakeAvailable,
      .open = fakeOpen,
      .close = fakeClose,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910291804.x9TI4JaV035681>