Browse Source

Fix build against older libzip

pull/5/head
falkTX 7 years ago
parent
commit
22c591a406
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/plugin.cpp

+ 7
- 1
src/plugin.cpp View File

@@ -23,6 +23,12 @@

#include "plugin.hpp"

#if LIBZIP_VERSION_MAJOR == 0 && LIBZIP_VERSION_MINOR <= 10
typedef zip zip_t;
typedef zip_file zip_file_t;
typedef struct zip_stat zip_stat_t;
#endif


namespace rack {

@@ -167,7 +173,7 @@ static void extract_zip(const char *dir, int zipfd) {
if (!za) return;
if (err) goto cleanup;

for (int i = 0; i < zip_get_num_entries(za, 0); i++) {
for (zip_uint64_t i = 0; i < zip_get_num_entries(za, 0); i++) {
zip_stat_t zs;
err = zip_stat_index(za, i, 0, &zs);
if (err) goto cleanup;


Loading…
Cancel
Save