From eee68c1b13fbe21c123f469712817e0c81f16383 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 23 Mar 2018 12:36:19 +0100 Subject: [PATCH] build: Allow building with released libgpg-error. * src/gpgme-json.c (add_base64_to_object): Return an error if building with an older libgpg-error. Signed-off-by: Werner Koch --- src/gpgme-json.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gpgme-json.c b/src/gpgme-json.c index 6ba79e5a..09b34bbb 100644 --- a/src/gpgme-json.c +++ b/src/gpgme-json.c @@ -147,6 +147,9 @@ xjson_AddBoolToObject (cjson_t object, const char *name, int abool) static gpg_error_t add_base64_to_object (cjson_t object, const char *name, gpgme_data_t data) { +#if GPGRT_VERSION_NUMBER < 0x011d00 /* 1.29 */ + return gpg_error (GPG_ERR_NOT_SUPPORTED); +#else gpg_err_code_t err; estream_t fp = NULL; gpgrt_b64state_t state = NULL; @@ -220,6 +223,7 @@ add_base64_to_object (cjson_t object, const char *name, gpgme_data_t data) es_fclose (fp); gpgme_data_release (data); return err; +#endif }