Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a56a729c authored by Elliott Hughes's avatar Elliott Hughes
Browse files

More Mac build fixes.

The libziparchive public headers that refer to `off64_t` also need the
Mac workaround.

In fastboot, there's a stray `lseek64` but since it's only for offset 0,
any kind of seek is fine.

Bug: N/A
Test: builds
Change-Id: I68b4f95202623ebf07ffe6c3e0e21437e7922c5b
parent 52db49b6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -852,7 +852,7 @@ static bool load_buf_fd(int fd, struct fastboot_buffer* buf) {
        buf->image_size = sz;
    }

    lseek64(fd, 0, SEEK_SET);
    lseek(fd, 0, SEEK_SET);
    int64_t limit = get_sparse_limit(sz);
    if (limit) {
        sparse_file** s = load_sparse_files(fd, limit);
+1 −0
Original line number Diff line number Diff line
@@ -73,6 +73,7 @@ cc_library {
        enabled: true,
    },
    double_loadable: true,
    export_shared_lib_headers: ["libbase"],

    defaults: [
        "libziparchive_defaults",
+2 −0
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@
#include <sys/cdefs.h>
#include <sys/types.h>

#include "android-base/off64_t.h"

/* Zip compression methods we support */
enum {
  kCompressStored = 0,    // no compression
+4 −5
Original line number Diff line number Diff line
@@ -15,12 +15,13 @@
 */

// Read-only stream access to Zip archives entries.
#ifndef LIBZIPARCHIVE_ZIPARCHIVESTREAMENTRY_H_
#define LIBZIPARCHIVE_ZIPARCHIVESTREAMENTRY_H_
#pragma once

#include <ziparchive/zip_archive.h>

#include <vector>

#include <ziparchive/zip_archive.h>
#include "android-base/off64_t.h"

class ZipArchiveStreamEntry {
 public:
@@ -43,5 +44,3 @@ class ZipArchiveStreamEntry {
  off64_t offset_ = 0;
  uint32_t crc32_ = 0u;
};

#endif  // LIBZIPARCHIVE_ZIPARCHIVESTREAMENTRY_H_
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <vector>

#include "android-base/macros.h"
#include "android-base/off64_t.h"

struct z_stream_s;
typedef struct z_stream_s z_stream;