PKGBUILDs/community/android-tools/fix_build_core.patch

95 lines
2.6 KiB
Diff
Raw Normal View History

2018-03-22 03:56:30 +00:00
diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
index 81201995a0..cfd60fce97 100644
--- a/adb/client/usb_libusb.cpp
+++ b/adb/client/usb_libusb.cpp
@@ -21,6 +21,7 @@
#include <stdint.h>
#include <atomic>
+#include <condition_variable>
#include <chrono>
#include <memory>
#include <mutex>
@@ -28,7 +29,7 @@
#include <thread>
#include <unordered_map>
-#include <libusb/libusb.h>
+#include <libusb-1.0/libusb.h>
#include <android-base/file.h>
#include <android-base/logging.h>
diff --git a/adb/sysdeps/posix/network.cpp b/adb/sysdeps/posix/network.cpp
index 45da5af4a1..ee3bf06994 100644
--- a/adb/sysdeps/posix/network.cpp
+++ b/adb/sysdeps/posix/network.cpp
@@ -21,6 +21,7 @@
#include <sys/socket.h>
#include <string>
+#include <string.h>
#include "adb_unique_fd.h"
diff --git a/base/errors_unix.cpp b/base/errors_unix.cpp
index 296995efe2..48269b6750 100644
--- a/base/errors_unix.cpp
+++ b/base/errors_unix.cpp
@@ -17,6 +17,7 @@
#include "android-base/errors.h"
#include <errno.h>
+#include <string.h>
namespace android {
namespace base {
diff --git a/base/file.cpp b/base/file.cpp
index a2f28878e8..0aa185e972 100644
--- a/base/file.cpp
+++ b/base/file.cpp
@@ -22,6 +22,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
+#include <string.h>
#include <memory>
#include <mutex>
diff --git a/base/logging.cpp b/base/logging.cpp
index 6357b4ba73..3c7dbce131 100644
--- a/base/logging.cpp
+++ b/base/logging.cpp
@@ -23,6 +23,7 @@
#include <fcntl.h>
#include <libgen.h>
#include <time.h>
+#include <string.h>
// For getprogname(3) or program_invocation_short_name.
#if defined(__ANDROID__) || defined(__APPLE__)
diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
index 709f061bd6..77629a882b 100644
--- a/fastboot/fs.cpp
+++ b/fastboot/fs.cpp
@@ -108,7 +108,7 @@ static int generate_ext4_image(const char* fileName, long long partSize,
static constexpr int block_size = 4096;
const std::string exec_dir = android::base::GetExecutableDirectory();
- const std::string mke2fs_path = exec_dir + "/mke2fs";
+ const std::string mke2fs_path = exec_dir + "/mke2fs.android";
std::vector<const char*> mke2fs_args = {mke2fs_path.c_str(), "-t", "ext4", "-b"};
std::string block_size_str = std::to_string(block_size);
diff --git a/libsparse/sparse_read.cpp b/libsparse/sparse_read.cpp
index bd668735a3..6168f2e248 100644
--- a/libsparse/sparse_read.cpp
+++ b/libsparse/sparse_read.cpp
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string>
+#include <string.h>
#include <unistd.h>
#include <sparse/sparse.h>