| Index: runtime/bin/file_macos.cc
|
| diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
|
| index 66ea550edc03f263e9ac8234c26dab8e062244e1..586a9e40bb57d55fc338f97be603d100ed4491f7 100644
|
| --- a/runtime/bin/file_macos.cc
|
| +++ b/runtime/bin/file_macos.cc
|
| @@ -73,9 +73,15 @@ off_t File::Position() {
|
| }
|
|
|
|
|
| -off_t File::SetPosition(int64_t position) {
|
| +bool File::SetPosition(int64_t position) {
|
| ASSERT(handle_->fd() >= 0);
|
| - return lseek(handle_->fd(), position, SEEK_SET);
|
| + return (lseek(handle_->fd(), position, SEEK_SET) != -1);
|
| +}
|
| +
|
| +
|
| +bool File::Truncate(int64_t length) {
|
| + ASSERT(handle_->fd() >= 0);
|
| + return (ftruncate(handle_->fd(), length) != -1);
|
| }
|
|
|
|
|
|
|