diff options
author | João Valverde <j@v6e.pt> | 2021-09-23 12:16:33 +0100 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-09-23 14:19:02 +0000 |
commit | f4c283298febb37631a755d10b89def515f2bd50 (patch) | |
tree | 456b0387e2e66fa17a593885a1ca999d89e4a21b /ui/qt | |
parent | f827daba2459a12086735e3f800aa7106daa8af7 (diff) |
Add compatibility fix for Minizip dependency
Diffstat (limited to 'ui/qt')
-rw-r--r-- | ui/qt/utils/wireshark_zip_helper.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ui/qt/utils/wireshark_zip_helper.cpp b/ui/qt/utils/wireshark_zip_helper.cpp index bcc9f43900..6e78eda64d 100644 --- a/ui/qt/utils/wireshark_zip_helper.cpp +++ b/ui/qt/utils/wireshark_zip_helper.cpp @@ -32,6 +32,14 @@ #include <QDateTime> #include <QMap> +/* Whether we are using minizip-ng and it uses an incompatible 'dos_date' + * struct member. */ +#ifdef HAVE_MZCOMPAT_DOS_DATE +#define _MZDOSDATE dos_date +#else +#define _MZDOSDATE dosDate +#endif + bool WiresharkZipHelper::unzip(QString zipFile, QString directory, bool (*fileCheck)(QString, int), QString (*cleanName)(QString)) { unzFile uf = Q_NULLPTR; @@ -209,7 +217,7 @@ void WiresharkZipHelper::addFileToZip(zipFile zf, QString filepath, QString file memset(&zi, 0, sizeof(zi)); QDateTime fTime = fi.lastModified(); - zi.dosDate = qDateToDosDate(fTime); + zi._MZDOSDATE = qDateToDosDate(fTime); QFile fh(filepath); /* Checks if a large file block has to be written */ |