From d55728539f0edfa660dc24775d3dfd1471aebd3b Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Wed, 14 Sep 2022 16:49:31 +0900 Subject: [PATCH] kbx: Fix for GPG_ERR_SOURCE_DEFAULT. * kbx/keybox-defs.h (GPG_ERR_SOURCE_DEFAULT): Define here, when not defined. * kbx/kbxutil.c: Let keybox-defs.h include gpg-error.h. -- GnuPG-bug-id: 6200 Signed-off-by: NIIBE Yutaka --- kbx/kbxutil.c | 3 +-- kbx/keybox-defs.h | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/kbx/kbxutil.c b/kbx/kbxutil.c index 911514406..f5bc8bd77 100644 --- a/kbx/kbxutil.c +++ b/kbx/kbxutil.c @@ -30,12 +30,11 @@ #include #include -#include +#include "keybox-defs.h" #include "../common/logging.h" #include "../common/stringhelp.h" #include "../common/utf8conv.h" #include "../common/i18n.h" -#include "keybox-defs.h" #include "../common/init.h" #include diff --git a/kbx/keybox-defs.h b/kbx/keybox-defs.h index 0af3aafb3..51ba8cd0e 100644 --- a/kbx/keybox-defs.h +++ b/kbx/keybox-defs.h @@ -20,12 +20,8 @@ #ifndef KEYBOX_DEFS_H #define KEYBOX_DEFS_H 1 -#ifdef GPG_ERR_SOURCE_DEFAULT -# if GPG_ERR_SOURCE_DEFAULT != GPG_ERR_SOURCE_KEYBOX -# error GPG_ERR_SOURCE_DEFAULT already defined -# endif -#else -# define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_KEYBOX +#ifndef GPG_ERR_SOURCE_DEFAULT +#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_KEYBOX #endif #include #define map_assuan_err(a) \