Merge "otautil: Fix mac build." am: eb8a064066
am: bc131ef1bd

Change-Id: I610fad4289df35d0327ecdd91c271a90f0dd45df
diff --git a/otautil/Android.bp b/otautil/Android.bp
index 5905ba6..659fefa 100644
--- a/otautil/Android.bp
+++ b/otautil/Android.bp
@@ -29,6 +29,7 @@
     ],
 
     cflags: [
+        "-D_FILE_OFFSET_BITS=64",
         "-Werror",
         "-Wall",
     ],
diff --git a/otautil/SysUtil.cpp b/otautil/SysUtil.cpp
index d54a824..0655c47 100644
--- a/otautil/SysUtil.cpp
+++ b/otautil/SysUtil.cpp
@@ -100,7 +100,7 @@
   }
 
   // Reserve enough contiguous address space for the whole file.
-  void* reserve = mmap64(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0);
+  void* reserve = mmap(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0);
   if (reserve == MAP_FAILED) {
     PLOG(ERROR) << "failed to reserve address space";
     return false;
@@ -135,8 +135,8 @@
       break;
     }
 
-    void* range_start = mmap64(next, range_size, PROT_READ, MAP_PRIVATE | MAP_FIXED, fd,
-                               static_cast<off64_t>(start) * blksize);
+    void* range_start = mmap(next, range_size, PROT_READ, MAP_PRIVATE | MAP_FIXED, fd,
+                             static_cast<off_t>(start) * blksize);
     if (range_start == MAP_FAILED) {
       PLOG(ERROR) << "failed to map range " << i << ": " << line;
       success = false;