mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-29 09:16:29 -05:00
Fix compiling with minizip-ng
* minizip-ng has slightly different defines and function names than the original minizip. These changes adapt the existing code to use the minizip-ng versions if necessary.
This commit is contained in:
parent
656e6161a0
commit
31db3c325d
@ -17,6 +17,5 @@ if(WITH_XC_KEESHARE)
|
||||
|
||||
add_library(keeshare STATIC ${keeshare_SOURCES})
|
||||
target_link_libraries(keeshare PUBLIC Qt5::Core Qt5::Widgets ${BOTAN2_LIBRARIES} ${ZLIB_LIBRARIES} PRIVATE ${MINIZIP_LIBRARIES})
|
||||
target_include_directories(keeshare SYSTEM PRIVATE ${MINIZIP_INCLUDE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif(WITH_XC_KEESHARE)
|
||||
|
@ -27,7 +27,14 @@
|
||||
|
||||
#include <QBuffer>
|
||||
#include <botan/pubkey.h>
|
||||
#include <zip.h>
|
||||
#include <minizip/zip.h>
|
||||
|
||||
// Compatibility with minizip-ng
|
||||
#ifdef MZ_VERSION_BUILD
|
||||
#undef Z_BEST_COMPRESSION
|
||||
#define Z_BEST_COMPRESSION MZ_COMPRESS_LEVEL_BEST
|
||||
#define zipOpenNewFileInZip64 zipOpenNewFileInZip_64
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "keys/PasswordKey.h"
|
||||
|
||||
#include <QBuffer>
|
||||
#include <unzip.h>
|
||||
#include <minizip/unzip.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user