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
This commit is contained in:
parent
52db49b68f
commit
a56a729c14
5 changed files with 9 additions and 6 deletions
|
@ -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);
|
||||
|
|
|
@ -73,6 +73,7 @@ cc_library {
|
|||
enabled: true,
|
||||
},
|
||||
double_loadable: true,
|
||||
export_shared_lib_headers: ["libbase"],
|
||||
|
||||
defaults: [
|
||||
"libziparchive_defaults",
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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_
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue