projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Centos 7 build.
[dcpomatic.git]
/
src
/
lib
/
zipper.cc
diff --git
a/src/lib/zipper.cc
b/src/lib/zipper.cc
index db84cdf71db596062a68b6ad5a8ec06382fd337c..625f3049a52a76df41c13d5bd94a49cfa6f6f3af 100644
(file)
--- a/
src/lib/zipper.cc
+++ b/
src/lib/zipper.cc
@@
-57,7
+57,11
@@
Zipper::add (string name, string content)
throw runtime_error ("could not create ZIP source");
}
throw runtime_error ("could not create ZIP source");
}
+#ifdef DCPOMATIC_HAVE_ZIP_FILE_ADD
if (zip_file_add(_zip, name.c_str(), source, ZIP_FL_ENC_GUESS) == -1) {
if (zip_file_add(_zip, name.c_str(), source, ZIP_FL_ENC_GUESS) == -1) {
+#else
+ if (zip_add(_zip, name.c_str(), source) == -1) {
+#endif
throw runtime_error(String::compose("failed to add data to ZIP archive (%1)", zip_strerror(_zip)));
}
}
throw runtime_error(String::compose("failed to add data to ZIP archive (%1)", zip_strerror(_zip)));
}
}