MFH: r477244 r477245 r477246 r477248 r477247
devel/android-tools-{adb,fastboot}: update to 9.0.0.r3 Changes: https://android.googlesource.com/platform/system/core/+log/android-8.1.0_r2..android-9.0.0_r3/adb Changes: https://android.googlesource.com/platform/system/core/+log/android-8.1.0_r2..android-9.0.0_r3/fastboot Approved by: ports-secteam (riggs)
This commit is contained in:
parent
1db7df8051
commit
5bc14a7c96
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q3/; revision=478189
|
@ -2,8 +2,8 @@
|
|||
|
||||
PORTNAME= android-tools-adb
|
||||
DISTVERSIONPREFIX= android-
|
||||
DISTVERSION?= 8.1.0_r2
|
||||
PORTREVISION?= 1
|
||||
DISTVERSION?= 9.0.0_r3
|
||||
PORTREVISION?= 0
|
||||
CATEGORIES= devel comms
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
|
@ -32,8 +32,8 @@ PLIST_FILES= bin/adb
|
|||
PORTDOCS= *
|
||||
|
||||
# Generated by "make update-revision" for "adb --version"
|
||||
SDK_REVISION?= 27.0.0
|
||||
GH_REVISION= ${DISTVERSIONSUFFIX:U86c2b588a369:S/-g//}
|
||||
SDK_REVISION?= 28.0.0
|
||||
GH_REVISION= ${DISTVERSIONSUFFIX:U0fac9018f238:S/-g//}
|
||||
|
||||
OPTIONS_DEFINE+=MDNSRESPONDER BASH DOCS TEST TEST_PYTHON
|
||||
OPTIONS_DEFAULT=MDNSRESPONDER
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
TIMESTAMP = 1509048179
|
||||
SHA256 (aosp-mirror-platform_system_core-android-8.1.0_r2_GH0.tar.gz) = 29c58327e06c9c938f8f3c0d3e991339eb98c53026203fbafc564e85cb6538bc
|
||||
SIZE (aosp-mirror-platform_system_core-android-8.1.0_r2_GH0.tar.gz) = 5227210
|
||||
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
|
||||
SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c
|
||||
SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967
|
||||
SHA256 (aosp-mirror-platform_development-android-8.1.0_r2_GH0.tar.gz) = bc9cdaf522147ce6a4d11e695394ce6044940172f8a19150e613adc4ae77279c
|
||||
SIZE (aosp-mirror-platform_development-android-8.1.0_r2_GH0.tar.gz) = 93884716
|
||||
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
|
||||
|
|
|
@ -77,13 +77,13 @@ SRCS+= android_pubkey.c
|
|||
TEST_SRCS+= android_pubkey_test.cpp
|
||||
|
||||
.PATH: ${.CURDIR}/../libcutils
|
||||
SRCS+= socket_inaddr_any_server_unix.c
|
||||
SRCS+= socket_local_client_unix.c
|
||||
SRCS+= socket_local_server_unix.c
|
||||
SRCS+= socket_network_client_unix.c
|
||||
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.c
|
||||
SRCS+= threads.c
|
||||
SRCS+= load_file.cpp
|
||||
SRCS+= threads.cpp
|
||||
# XXX Obsolete after 10.2 or r279980/r280329
|
||||
CPPFLAGS.sockets.cpp+= -o ${.TARGET}
|
||||
|
||||
|
@ -102,11 +102,7 @@ SRCS+= stderr_write.c
|
|||
|
||||
CPPFLAGS+= -DADB_VERSION="\"${VERSION}\""
|
||||
CPPFLAGS+= -DADB_HOST=1
|
||||
CPPFLAGS+= -DHAVE_FORKEXEC=1
|
||||
CPPFLAGS+= -DHAVE_SYMLINKS
|
||||
CPPFLAGS+= -DHAVE_TERMIO_H
|
||||
CPPFLAGS+= -DHAVE_SYS_SOCKET_H
|
||||
CPPFLAGS+= -D_FILE_OFFSET_BITS=64
|
||||
CPPFLAGS+= -Doff64_t=off_t
|
||||
CPPFLAGS+= -DFAKE_LOG_DEVICE=1
|
||||
CPPFLAGS+= -I${.CURDIR}
|
||||
CPPFLAGS+= -I${.CURDIR}/../include
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- base/include/android-base/logging.h.orig 2015-09-29 18:07:07 UTC
|
||||
+++ base/include/android-base/logging.h
|
||||
@@ -321,7 +321,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)
|
||||
+#if defined(NDEBUG) || !defined(__ANDROID__)
|
||||
static constexpr bool kEnableDChecks = false;
|
||||
#else
|
||||
static constexpr bool kEnableDChecks = true;
|
|
@ -1,13 +1,6 @@
|
|||
--- adb/client/usb_libusb.cpp.orig 2017-06-20 10:50:27 UTC
|
||||
+++ adb/client/usb_libusb.cpp
|
||||
@@ -22,13 +22,14 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
+#include <condition_variable>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <thread>
|
||||
#include <unordered_map>
|
||||
|
||||
|
@ -16,11 +9,19 @@
|
|||
|
||||
#include <android-base/file.h>
|
||||
#include <android-base/logging.h>
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "adb.h"
|
||||
#include "adb_utils.h"
|
||||
+#include "sysdeps/chrono.h"
|
||||
#include "transport.h"
|
||||
#include "usb.h"
|
||||
|
||||
@@ -89,7 +89,11 @@ struct transfer_info {
|
||||
};
|
||||
|
||||
namespace libusb {
|
||||
+#if defined(__linux__) || defined(__APPLE__)
|
||||
+#if defined(__linux__) || defined(__APPLE__) || defined(_WIN32)
|
||||
struct usb_handle : public ::usb_handle {
|
||||
+#else
|
||||
+struct usb_handle {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- adb/transport_usb.cpp.orig 2017-06-20 10:50:27 UTC
|
||||
--- adb/transport_usb.cpp.orig 2018-06-21 00:58:42 UTC
|
||||
+++ adb/transport_usb.cpp
|
||||
@@ -191,6 +191,8 @@ int is_adb_interface(int usb_class, int usb_subclass,
|
||||
@@ -186,6 +186,8 @@ int is_adb_interface(int usb_class, int usb_subclass,
|
||||
bool should_use_libusb() {
|
||||
#if defined(_WIN32) || !ADB_HOST
|
||||
#if !ADB_HOST
|
||||
return false;
|
||||
+#elif !defined(__linux__) && !defined(__APPLE__)
|
||||
+#elif !defined(__linux__) && !defined(__APPLE__) && !defined(_WIN32)
|
||||
+ return true;
|
||||
#else
|
||||
static bool disable = getenv("ADB_LIBUSB") && strcmp(getenv("ADB_LIBUSB"), "0") == 0;
|
||||
return !disable;
|
||||
static bool enable = getenv("ADB_LIBUSB") && strcmp(getenv("ADB_LIBUSB"), "1") == 0;
|
||||
return enable;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
ADB_USB_INTERFACE(libusb::usb_handle*);
|
||||
}
|
||||
|
||||
+#if defined(__linux__) || defined(__APPLE__)
|
||||
+#if defined(__linux__) || defined(__APPLE__) || defined(_WIN32)
|
||||
namespace native {
|
||||
struct usb_handle;
|
||||
ADB_USB_INTERFACE(native::usb_handle*);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
+#include <pthread_np.h>
|
||||
+#elif defined(__NetBSD__)
|
||||
+#include <lwp.h>
|
||||
+#else
|
||||
+#else // OpenBSD, Solaris
|
||||
+#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
@ -39,11 +39,11 @@
|
|||
return GetCurrentThreadId();
|
||||
+#elif defined(__DragonFly__)
|
||||
+ return lwp_gettid();
|
||||
+#elif defined(__NetBSD__)
|
||||
+ return _lwp_self();
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ return pthread_getthreadid_np();
|
||||
+#else
|
||||
+#elif defined(__NetBSD__)
|
||||
+ return _lwp_self();
|
||||
+#else // OpenBSD, Solaris
|
||||
+ return (intptr_t) pthread_self();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,31 +1,40 @@
|
|||
--- libcutils/threads.c.orig 2015-06-17 22:20:38 UTC
|
||||
+++ libcutils/threads.c
|
||||
@@ -29,6 +29,14 @@
|
||||
--- libcutils/threads.cpp.orig 2018-07-13 19:58:45 UTC
|
||||
+++ libcutils/threads.cpp
|
||||
@@ -24,11 +24,19 @@
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/time.h>
|
||||
#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
|
||||
#elif defined(__linux__) && !defined(__ANDROID__)
|
||||
#include <syscall.h>
|
||||
#include <unistd.h>
|
||||
#elif defined(_WIN32)
|
||||
#include <windows.h>
|
||||
+#else // OpenBSD, Solaris
|
||||
+#include <stdint.h>
|
||||
#endif
|
||||
|
||||
// No definition needed for Android because we'll just pick up bionic's copy.
|
||||
@@ -40,6 +48,14 @@ pid_t gettid() {
|
||||
@@ -38,10 +46,18 @@ pid_t gettid() {
|
||||
uint64_t tid;
|
||||
pthread_threadid_np(NULL, &tid);
|
||||
return tid;
|
||||
+#elif defined(__DragonFly__)
|
||||
+ return lwp_gettid();
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ return pthread_getthreadid_np();
|
||||
+#elif defined(__NetBSD__)
|
||||
+ return _lwp_self();
|
||||
#elif defined(__linux__)
|
||||
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
|
||||
+#else // OpenBSD, Solaris
|
||||
+ return (intptr_t) pthread_self();
|
||||
#endif
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
PORTNAME= android-tools-fastboot
|
||||
DISTVERSIONPREFIX= android-
|
||||
DISTVERSION?= 8.1.0_r2
|
||||
PORTREVISION?= 1
|
||||
DISTVERSION?= 9.0.0_r3
|
||||
PORTREVISION?= 0
|
||||
CATEGORIES= devel sysutils
|
||||
MASTER_SITES= https://salsa.debian.org/android-tools-team/android-tools/raw/706e754/debian/:manpage
|
||||
DISTFILES= fastboot.1:manpage
|
||||
|
@ -12,18 +12,12 @@ EXTRACT_ONLY= ${DISTFILES:N*\:manpage:C/:.*//}
|
|||
MAINTAINER= jbeich@FreeBSD.org
|
||||
COMMENT= Android Fastboot protocol CLI tool
|
||||
|
||||
LICENSE= APACHE20 BSD2CLAUSE PD
|
||||
LICENSE= APACHE20 BSD2CLAUSE
|
||||
LICENSE_COMB= multi
|
||||
LICENSE_FILE_PD= ${WRKSRC}/libselinux/NOTICE
|
||||
|
||||
LIB_DEPENDS= libpcre.so:devel/pcre
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= aosp-mirror jbeich:extras,libselinux
|
||||
GH_PROJECT= platform_system_core platform_system_extras:extras \
|
||||
platform_external_libselinux:libselinux
|
||||
GH_TAGNAME?= android-7.1.2_r17:libselinux
|
||||
GH_SUBDIR= libselinux:libselinux
|
||||
GH_ACCOUNT= aosp-mirror jbeich:extras
|
||||
GH_PROJECT= platform_system_core platform_system_extras:extras
|
||||
|
||||
CONFLICTS_INSTALL?= ${PORTNAME}-devel-*
|
||||
|
||||
|
@ -35,16 +29,15 @@ MAKEFILE?= ${.CURDIR}/files/Makefile
|
|||
MAKE_ENV= BINDIR="${PREFIX}/bin" EXTRADIR="${FILESDIR}" \
|
||||
FILESDIR="${DOCSDIR}" \
|
||||
VERSION="${SDK_REVISION}-0 ${GH_REVISION}-android" \
|
||||
MANDIR="${PREFIX}/man/man" \
|
||||
LIBPCRE="${LOCALBASE}/lib/libpcre.a"
|
||||
MANDIR="${PREFIX}/man/man"
|
||||
PLIST_FILES= bin/fastboot \
|
||||
man/man1/fastboot.1.gz
|
||||
PORTDOCS= *
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
# Generated by "make update-revision" for "fastboot --version"
|
||||
SDK_REVISION?= 27.0.0
|
||||
GH_REVISION= ${DISTVERSIONSUFFIX:U86c2b588a369:S/-g//}
|
||||
SDK_REVISION?= 28.0.0
|
||||
GH_REVISION= ${DISTVERSIONSUFFIX:U0fac9018f238:S/-g//}
|
||||
|
||||
OPTIONS_DEFINE= BASH DOCS
|
||||
OPTIONS_SUB= yes
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
TIMESTAMP = 1509048179
|
||||
TIMESTAMP = 1529542722
|
||||
SHA256 (fastboot.1) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283
|
||||
SIZE (fastboot.1) = 5906
|
||||
SHA256 (aosp-mirror-platform_system_core-android-8.1.0_r2_GH0.tar.gz) = 29c58327e06c9c938f8f3c0d3e991339eb98c53026203fbafc564e85cb6538bc
|
||||
SIZE (aosp-mirror-platform_system_core-android-8.1.0_r2_GH0.tar.gz) = 5227210
|
||||
SHA256 (jbeich-platform_system_extras-android-8.1.0_r2_GH0.tar.gz) = 3ffa650a11b546928ffd9cf9688aea379151cb71f90fa6ef3d7ab4bf56a9dc67
|
||||
SIZE (jbeich-platform_system_extras-android-8.1.0_r2_GH0.tar.gz) = 196070852
|
||||
SHA256 (jbeich-platform_external_libselinux-android-7.1.2_r17_GH0.tar.gz) = 659e43d3e14b4f4fe8955975ad268310bfad0529f408fb33342ed70ae0d456c7
|
||||
SIZE (jbeich-platform_external_libselinux-android-7.1.2_r17_GH0.tar.gz) = 59763
|
||||
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
|
||||
SHA256 (jbeich-platform_system_extras-android-9.0.0_r3_GH0.tar.gz) = d82c4576bed24bfe701bb8c781714fa70365c03aed93cf4777407215de4d672d
|
||||
SIZE (jbeich-platform_system_extras-android-9.0.0_r3_GH0.tar.gz) = 211722695
|
||||
SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c
|
||||
SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967
|
||||
|
|
|
@ -33,26 +33,12 @@ SRCS+= parsenetaddress.cpp
|
|||
SRCS+= stringprintf.cpp
|
||||
SRCS+= strings.cpp
|
||||
|
||||
# required by fastboot
|
||||
.PATH: ${.CURDIR}/../ext4_utils
|
||||
SRCS+= allocate.c
|
||||
SRCS+= contents.c
|
||||
SRCS+= crc16.c
|
||||
SRCS+= ext4_sb.c
|
||||
SRCS+= ext4_utils.c
|
||||
SRCS+= ext4fixup.c
|
||||
SRCS+= extent.c
|
||||
SRCS+= indirect.c
|
||||
SRCS+= make_ext4fs.c
|
||||
SRCS+= sha1.c
|
||||
SRCS+= wipe.c
|
||||
|
||||
# required by fastboot
|
||||
.PATH: ${.CURDIR}/../libcutils
|
||||
SRCS+= android_get_control_file.cpp
|
||||
SRCS+= ../libcutils/sockets.cpp
|
||||
SRCS+= socket_inaddr_any_server_unix.c
|
||||
SRCS+= socket_network_client_unix.c
|
||||
SRCS+= socket_inaddr_any_server_unix.cpp
|
||||
SRCS+= socket_network_client_unix.cpp
|
||||
SRCS+= sockets_unix.cpp
|
||||
CPPFLAGS.sockets.cpp+= -o ${.TARGET} # XXX pre-r279980
|
||||
|
||||
|
@ -70,19 +56,7 @@ SRCS+= logprint.c
|
|||
SRCS+= stderr_write.c
|
||||
SRCS+= test_utils.cpp
|
||||
|
||||
# required by ext4_utils
|
||||
.PATH: ${.CURDIR}/../libselinux/src
|
||||
SRCS+= callbacks.c
|
||||
SRCS+= check_context.c
|
||||
SRCS+= freecon.c
|
||||
SRCS+= init.c
|
||||
SRCS+= label.c
|
||||
SRCS+= label_android_property.c
|
||||
SRCS+= label_file.c
|
||||
SRCS+= label_support.c
|
||||
CPPFLAGS.label_file.c+= -D_WITH_GETLINE
|
||||
|
||||
# required by fastboot and ext4_utils
|
||||
# required by fastboot
|
||||
.PATH: ${.CURDIR}/../libsparse
|
||||
SRCS+= backed_block.c
|
||||
SRCS+= output_file.c
|
||||
|
@ -109,15 +83,11 @@ CPPFLAGS+= -DFAKE_LOG_DEVICE=1
|
|||
CPPFLAGS+= -I${.CURDIR}
|
||||
CPPFLAGS+= -I${.CURDIR}/../include
|
||||
CPPFLAGS+= -I${.CURDIR}/../adb
|
||||
CPPFLAGS+= -I${.CURDIR}/../mkbootimg
|
||||
CPPFLAGS+= -I${.CURDIR}/../mkbootimg/include/bootimg
|
||||
CPPFLAGS+= -I${.CURDIR}/../base/include
|
||||
CPPFLAGS+= -I${.CURDIR}/../ext4_utils/include
|
||||
CPPFLAGS+= -I${.CURDIR}/../f2fs_utils
|
||||
CPPFLAGS+= -I${.CURDIR}/../libselinux/include
|
||||
CPPFLAGS+= -I${.CURDIR}/../libsparse/include
|
||||
CPPFLAGS+= -I${.CURDIR}/../libziparchive/include
|
||||
CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}}
|
||||
CPPFLAGS+= $$(${PKG_CONFIG} libpcre --cflags 2>/dev/null)
|
||||
CPPFLAGS+= $$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null)
|
||||
CXXFLAGS+= -D__STDC_LIMIT_MACROS # DragonFly
|
||||
CXXFLAGS+= -std=gnu++11
|
||||
|
@ -127,10 +97,9 @@ CFLAGS+= ${CPPFLAGS}
|
|||
CXXFLAGS+= ${CPPFLAGS}
|
||||
.endif
|
||||
|
||||
LDADD+= $$(${PKG_CONFIG} libpcre --libs 2>/dev/null || echo -lpcre)
|
||||
LDADD+= $$(${PKG_CONFIG} libusb-1.0 --libs 2>/dev/null || echo -lusb)
|
||||
LDADD+= -lz \-lpthread
|
||||
DPADD+= ${LIBPCRE} ${LIBPTHREAD} ${LIBUSB} ${LIBZ}
|
||||
DPADD+= ${LIBPTHREAD} ${LIBUSB} ${LIBZ}
|
||||
|
||||
PKG_CONFIG?= pkg-config
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
--- base/file.cpp.orig 2016-08-08 21:10:17 UTC
|
||||
+++ base/file.cpp
|
||||
@@ -21,6 +21,8 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+#include <cstdio> // BUFSIZ
|
||||
+#include <cstring> // strerror
|
||||
#include <string>
|
||||
|
||||
#include "android-base/macros.h" // For TEMP_FAILURE_RETRY on Darwin.
|
|
@ -28,7 +28,7 @@
|
|||
+#include <pthread_np.h>
|
||||
+#elif defined(__NetBSD__)
|
||||
+#include <lwp.h>
|
||||
+#else
|
||||
+#else // OpenBSD, Solaris
|
||||
+#include <stdint.h>
|
||||
#endif
|
||||
|
||||
|
@ -39,11 +39,11 @@
|
|||
return GetCurrentThreadId();
|
||||
+#elif defined(__DragonFly__)
|
||||
+ return lwp_gettid();
|
||||
+#elif defined(__NetBSD__)
|
||||
+ return _lwp_self();
|
||||
+#elif defined(__FreeBSD__)
|
||||
+ return pthread_getthreadid_np();
|
||||
+#else
|
||||
+#elif defined(__NetBSD__)
|
||||
+ return _lwp_self();
|
||||
+#else // OpenBSD, Solaris
|
||||
+ return (intptr_t) pthread_self();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
--- ext4_utils/ext4_utils.c.orig 2012-12-18 23:27:26 UTC
|
||||
+++ ext4_utils/ext4_utils.c
|
||||
@@ -36,8 +36,16 @@
|
||||
|
||||
#if defined(__linux__)
|
||||
#include <linux/fs.h>
|
||||
-#elif defined(__APPLE__) && defined(__MACH__)
|
||||
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
|
||||
+ || (defined(__APPLE__) && defined(__MACH__))
|
||||
#include <sys/disk.h>
|
||||
+#elif defined(__sun)
|
||||
+#include <sys/dkio.h>
|
||||
+#elif defined(__Bitrig__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
+#include <sys/disklabel.h>
|
||||
+#include <sys/dkio.h>
|
||||
+#elif defined(__DragonFly__)
|
||||
+#include <sys/diskslice.h>
|
||||
#endif
|
||||
|
||||
#include "ext4.h"
|
||||
@@ -53,6 +61,8 @@ struct sparse_file *ext4_sparse_file;
|
||||
jmp_buf setjmp_env;
|
||||
|
||||
/* Definition from RFC-4122 */
|
||||
+/* XXX <sys/uuid.h> defines slightly different |struct uuid| */
|
||||
+#define uuid ext4_uuid
|
||||
struct uuid {
|
||||
u32 time_low;
|
||||
u16 time_mid;
|
||||
@@ -383,10 +391,24 @@ static u64 get_block_device_size(int fd)
|
||||
u64 size = 0;
|
||||
int ret;
|
||||
|
||||
-#if defined(__linux__)
|
||||
+#if defined(BLKGETSIZE64)
|
||||
ret = ioctl(fd, BLKGETSIZE64, &size);
|
||||
-#elif defined(__APPLE__) && defined(__MACH__)
|
||||
+#elif defined(DKIOCGETBLOCKCOUNT)
|
||||
ret = ioctl(fd, DKIOCGETBLOCKCOUNT, &size);
|
||||
+#elif defined(DIOCGMEDIASIZE)
|
||||
+ ret = ioctl(fd, DIOCGMEDIASIZE, &size);
|
||||
+#elif defined(DKIOCGMEDIAINFO)
|
||||
+ struct dk_minfo minfo;
|
||||
+ ret = ioctl(fd, DKIOCGMEDIAINFO, &minfo);
|
||||
+ size = minfo.dki_lbsize * minfo.dki_capacity;
|
||||
+#elif defined(DIOCGDINFO)
|
||||
+ struct disklabel dl;
|
||||
+ ret = ioctl(fd, DIOCGDINFO, &dl);
|
||||
+ size = dl.d_secsize * dl.d_nsectors * dl.d_ntracks * dl.d_ncylinders;
|
||||
+#elif defined(DIOCGPART)
|
||||
+ struct partinfo pi;
|
||||
+ ret = ioctl(fd, DIOCGPART, &pi);
|
||||
+ size = pi.media_size;
|
||||
#else
|
||||
close(fd);
|
||||
return 0;
|
|
@ -1,30 +0,0 @@
|
|||
--- libselinux/src/init.c.orig 2015-06-15 21:40:06 UTC
|
||||
+++ libselinux/src/init.c
|
||||
@@ -7,10 +7,7 @@
|
||||
#include <stdio.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
-#ifdef DARWIN
|
||||
-#include <sys/param.h>
|
||||
-#include <sys/mount.h>
|
||||
-#else
|
||||
+#if defined(__linux__)
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
|
||||
@@ -26,6 +23,7 @@ int selinux_page_size = 0;
|
||||
|
||||
static void init_selinuxmnt(void)
|
||||
{
|
||||
+#if defined(__linux__)
|
||||
char buf[BUFSIZ], *p;
|
||||
FILE *fp=NULL;
|
||||
struct statfs sfbuf;
|
||||
@@ -94,6 +92,7 @@ static void init_selinuxmnt(void)
|
||||
if (fp)
|
||||
fclose(fp);
|
||||
return;
|
||||
+#endif
|
||||
}
|
||||
|
||||
void fini_selinuxmnt(void)
|
|
@ -0,0 +1,29 @@
|
|||
--- libziparchive/zip_archive.cc.orig 2018-06-21 00:58:42 UTC
|
||||
+++ libziparchive/zip_archive.cc
|
||||
@@ -47,6 +47,17 @@
|
||||
#include "zip_archive_common.h"
|
||||
#include "zip_archive_private.h"
|
||||
|
||||
+#if !defined(_WIN32)
|
||||
+#if __cplusplus >= 201703 || (defined(_LIBCPP_VERSION) && __has_include(<string_view>))
|
||||
+#include <string_view>
|
||||
+#elif __cplusplus >= 201402
|
||||
+#include <experimental/string_view>
|
||||
+namespace std {
|
||||
+using std::experimental::string_view;
|
||||
+}
|
||||
+#endif // __cplusplus >= 201703
|
||||
+#endif // !defined(_WIN32)
|
||||
+
|
||||
using android::base::get_unaligned;
|
||||
|
||||
// Used to turn on crc checks - verify that the content CRC matches the values
|
||||
@@ -100,7 +111,7 @@ static uint32_t RoundUpPower2(uint32_t val) {
|
||||
}
|
||||
|
||||
static uint32_t ComputeHash(const ZipString& name) {
|
||||
-#if !defined(_WIN32)
|
||||
+#if __cplusplus >= 201402 && !defined(_WIN32)
|
||||
return std::hash<std::string_view>{}(
|
||||
std::string_view(reinterpret_cast<const char*>(name.name), name.name_length));
|
||||
#else
|
Loading…
Reference in New Issue