From 62bd291dcc6d3120a28a2a2ce1bf1bd7c2b750dd Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 8 Aug 2024 15:57:23 +0200 Subject: common: Allow building with libgpg-error < 1.47 * common/util.h (GPG_ERR_BAD_RESET_CODE): New replacement. (GPG_ERR_NO_RESET_CODE): New. (GPG_ERR_BAD_PUK): New. -- But as least 1.38 is required. Tested with 1.42 --- common/util.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/util.h b/common/util.h index ca381227d..658447171 100644 --- a/common/util.h +++ b/common/util.h @@ -39,6 +39,11 @@ * libgpg-error version. Define them here. * Example: (#if GPG_ERROR_VERSION_NUMBER < 0x011500 // 1.21) */ +#if GPG_ERROR_VERSION_NUMBER < 0x012f00 /* 1.47 */ +#define GPG_ERR_BAD_PUK 320 +#define GPG_ERR_NO_RESET_CODE 321 +#define GPG_ERR_BAD_RESET_CODE 322 +#endif #ifndef EXTERN_UNLESS_MAIN_MODULE # if !defined (INCLUDED_BY_MAIN_MODULE) -- cgit v1.2.3