summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-11-21 20:20:04 +0100
committerCarl Hetherington <cth@carlh.net>2023-11-21 20:20:04 +0100
commit38643ec631074ae628a4c414a1e7a3462aba19ed (patch)
tree664856d54be34a25ee6ccd113eb8fc30b2c754c9 /src
parentb1eda03eac8661d8b3b1e8db7a0cf7c793e8f46c (diff)
Fix Centos 7 build.
Diffstat (limited to 'src')
-rw-r--r--src/lib/zipper.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/zipper.cc b/src/lib/zipper.cc
index db84cdf71..625f3049a 100644
--- 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");
}
+#ifdef DCPOMATIC_HAVE_ZIP_FILE_ADD
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)));
}
}