fastboot driver: ftrucate64->ftruncate.
Also, -D_FILE_OFFSET_BITS=64 so that off_t is always 64 bits. This fixes mac build. Test: forrest Change-Id: I584e136a5f3ca9874fd5364cc4c93f8b1e8feb19
This commit is contained in:
parent
9a74174efe
commit
c8715002ab
2 changed files with 2 additions and 1 deletions
|
@ -208,6 +208,7 @@ cc_defaults {
|
|||
"-Werror",
|
||||
"-Wunreachable-code",
|
||||
"-DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION",
|
||||
"-D_FILE_OFFSET_BITS=64"
|
||||
],
|
||||
|
||||
target: {
|
||||
|
|
|
@ -184,7 +184,7 @@ class DataUpdater {
|
|||
if (!android::base::WriteStringToFd(data, fd)) {
|
||||
return ErrnoErrorf("Cannot write new content to {}", what);
|
||||
}
|
||||
if (TEMP_FAILURE_RETRY(ftruncate64(fd.get(), data.size())) == -1) {
|
||||
if (TEMP_FAILURE_RETRY(ftruncate(fd.get(), data.size())) == -1) {
|
||||
return ErrnoErrorf("Truncating new vendor boot image to 0x{:x} fails", data.size());
|
||||
}
|
||||
return {};
|
||||
|
|
Loading…
Reference in a new issue