Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mdh34/quickDocs
Browse files Browse the repository at this point in the history
  • Loading branch information
mdh34 committed Oct 7, 2018
2 parents 46c4bc9 + 0e8bfd9 commit 070e8aa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Services/Downloader.vala
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,24 @@ namespace Downloader {
continue;
};

void* buffer = null;
size_t buffer_length;
Posix.off_t offset;

#if ARCHIVE_332
uint8[] buffer;
if (entry.size () > 0) {
while (reader.read_data_block (out buffer, out offset) != Archive.Result.EOF) {
disk.write_data_block (buffer, offset);
}
}
#else
void* buffer = null;
size_t buffer_length;
if (entry.size () > 0) {
while (reader.read_data_block (out buffer, out buffer_length, out offset) != Archive.Result.EOF) {
disk.write_data_block (buffer, buffer_length, offset);
}
}
#endif
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
if dependency('libarchive').version().version_compare('>=3.3.2')
add_project_arguments('--define=ARCHIVE_332', language: 'vala')
endif
executable(
meson.project_name(),
'Application.vala',
Expand Down

0 comments on commit 070e8aa

Please sign in to comment.