From: Olivier Goffart Date: Wed, 18 Apr 2018 12:18:10 +0000 (+0200) Subject: Logger: Guard zlib usage by ZLIB_FOUND X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~600 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7969067f80a84aa4e2badc7315d95cd01ea6b1af;p=nextcloud-desktop.git Logger: Guard zlib usage by ZLIB_FOUND Similar to the use for the checksum. I know that zlib is required in principle, but i don't have it in one of my test building environment, and it is easier to just disable it. --- diff --git a/src/libsync/logger.cpp b/src/libsync/logger.cpp index d5d204831..a9df83a63 100644 --- a/src/libsync/logger.cpp +++ b/src/libsync/logger.cpp @@ -23,7 +23,9 @@ #include +#ifdef ZLIB_FOUND #include +#endif #ifdef Q_OS_WIN #include // for stdout @@ -261,6 +263,7 @@ void Logger::disableTemporaryFolderLogDir() static bool compressLog(const QString &originalName, const QString &targetName) { +#ifdef ZLIB_FOUND QFile original(originalName); if (!original.open(QIODevice::ReadOnly)) return false; @@ -279,6 +282,9 @@ static bool compressLog(const QString &originalName, const QString &targetName) } gzclose(compressed); return true; +#else + return false; +#endif } void Logger::enterNextLogFile()