From aa78c5b0ec7f19ab43801ef9d7a2c6eda9255662 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 26 Oct 2015 06:27:40 -0700 Subject: Allow building with both libzip 0.11.x and 1.0.x Signed-off-by: Dirk Hohndel --- qt-ui/subsurfacewebservices.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qt-ui/subsurfacewebservices.cpp') diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp index 18f42819e..ee079cc48 100644 --- a/qt-ui/subsurfacewebservices.cpp +++ b/qt-ui/subsurfacewebservices.cpp @@ -262,9 +262,13 @@ bool DivelogsDeWebServices::prepare_dives_for_divelogs(const QString &tempfile, xsltFreeStylesheet(xslt); if (zip_close(zip)) { int ze, se; +#if LIBZIP_VERSION_MAJOR >= 1 zip_error_t *error = zip_get_error(zip); ze = zip_error_code_zip(error); se = zip_error_code_system(error); +#else + zip_error_get(zip, &ze, &se); +#endif report_error(qPrintable(tr("error writing zip file: %s zip error %d system error %d - %s")), qPrintable(QDir::toNativeSeparators(tempfile)), ze, se, zip_strerror(zip)); return false; -- cgit v1.2.3-70-g09d2