diff --git a/minitar.h b/minitar.h index 1d636ab..34a49fc 100644 --- a/minitar.h +++ b/minitar.h @@ -51,7 +51,7 @@ extern "C" int minitar_find_by_name(struct minitar* mp, const char* name, struct minitar_entry* out); int minitar_find_by_path(struct minitar* mp, const char* path, struct minitar_entry* out); int minitar_find_any_of(struct minitar* mp, enum minitar_file_type type, struct minitar_entry* out); - size_t minitar_read_contents(struct minitar* mp, struct minitar_entry* entry, char* buf, size_t max); + size_t minitar_read_contents(struct minitar* mp, const struct minitar_entry* entry, char* buf, size_t max); int minitar_close(struct minitar* mp); #ifdef __cplusplus diff --git a/src/tar.c b/src/tar.c index a5b6570..1242e82 100644 --- a/src/tar.c +++ b/src/tar.c @@ -111,7 +111,7 @@ int minitar_find_any_of(struct minitar* mp, enum minitar_file_type type, struct return -1; } -size_t minitar_read_contents(struct minitar* mp, struct minitar_entry* entry, char* buf, size_t max) +size_t minitar_read_contents(struct minitar* mp, const struct minitar_entry* entry, char* buf, size_t max) { if (!max) return 0; if (!entry->metadata.size) return 0;