Merge "Fix A/B update fail for 32-bit devices" am: 0474f1be45

am: 5902405547

Change-Id: I2abc59eb6a3f9d923eed8319f84386792023d841
This commit is contained in:
Iris Chang authored and android-build-merger committed 2018-01-15 09:43:56 +00:00
commit 290269b9f5
3 files changed
+7 -5

No files matched your search

+3
View File
@@ -27,6 +27,9 @@
# "bsdiff/...".
'<(platform2_root)/../aosp/external',
],
'defines': [
'_FILE_OFFSET_BITS=64',
],
},
'targets': [
# bsdiff static library
+1 -5
View File
@@ -64,11 +64,7 @@ bool File::Seek(off_t pos) {
errno = EBADF;
return false;
}
// fseek() uses a long value for the offset which could be smaller than off_t.
if (pos > std::numeric_limits<long>::max()) {
errno = EOVERFLOW;
return false;
}
off_t newpos = lseek(fd_, pos, SEEK_SET);
if (newpos < 0)
return false;
+3
View File
@@ -12,6 +12,9 @@
#include "bsdiff/common.h"
static_assert(sizeof(off_t) == sizeof(int64_t),
"off_t must be a 64-bit number, use -D_FILE_OFFSET_BITS=64");
namespace bsdiff {
class BSDIFF_EXPORT FileInterface {