From 8c9cfba67711d0c3902f9bba444b68c7415d4f98 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 19 Oct 2017 09:04:33 +0200 Subject: fix build with system gpgme Change-Id: I00e6d6ce476adbd22bcfb4eb55d4db4194f4bc92 --- xmlsecurity/source/gpg/CertificateImpl.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'xmlsecurity') diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx b/xmlsecurity/source/gpg/CertificateImpl.cxx index 6d06b24c3a2a..16eeda80441f 100644 --- a/xmlsecurity/source/gpg/CertificateImpl.cxx +++ b/xmlsecurity/source/gpg/CertificateImpl.cxx @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include + #include "CertificateImpl.hxx" #include @@ -215,8 +217,11 @@ void CertificateImpl::setCertificate(GpgME::Context* ctx, const GpgME::Key& key) ctx->setArmor(false); // caller will base64-encode anyway GpgME::Error err = ctx->exportPublicKeys( key.primaryFingerprint(), - data_out, - officecfg::Office::Common::Security::OpenPGP::MinimalKeyExport::get()); + data_out +#if GPGME_CAN_EXPORT_MINIMAL_KEY + , officecfg::Office::Common::Security::OpenPGP::MinimalKeyExport::get() +#endif + ); if (err) throw RuntimeException("The GpgME library failed to retrieve the public key"); -- cgit