summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2023-04-04 16:51:58 +0200
committerWerner Koch <wk@gnupg.org>2023-04-04 16:51:58 +0200
commitd261f5e5d0d56dcb3fbf323e94625ac18e7848d6 (patch)
tree7027e14ee0a994569d4982c867ab125a02cf5a24
parentUse the keyboxd for a fresh install (diff)
downloadgnupg2-d261f5e5d0d56dcb3fbf323e94625ac18e7848d6.tar.xz
gnupg2-d261f5e5d0d56dcb3fbf323e94625ac18e7848d6.zip
common: Change allocation of the comopt symbol.
* common/comopt.h (struct gnupg_comopt_s): New. * common/comopt.c (struct gnupg_comopt_s): Define here in the data segment.
-rw-r--r--common/comopt.c2
-rw-r--r--common/comopt.h7
2 files changed, 7 insertions, 2 deletions
diff --git a/common/comopt.c b/common/comopt.c
index 470cdac61..1cfd581b1 100644
--- a/common/comopt.c
+++ b/common/comopt.c
@@ -60,6 +60,8 @@ static gpgrt_opt_t opts[] = {
};
+struct gnupg_comopt_s comopt = {NULL};
+
/* Parse the common options in the homedir and etc. This needs to be
* called after the gpgrt config directories are set. MODULE_ID is one of
diff --git a/common/comopt.h b/common/comopt.h
index 2a27fddac..9236afc6b 100644
--- a/common/comopt.h
+++ b/common/comopt.h
@@ -35,13 +35,16 @@
/* Common options for all GnuPG components. */
-struct
+struct gnupg_comopt_s
{
char *logfile; /* Socket used by daemons for logging. */
int use_keyboxd; /* Use the keyboxd as storage backend. */
int no_autostart; /* Do not start gpg-agent. */
char *keyboxd_program; /* Use this as keyboxd program. */
-} comopt;
+};
+
+
+extern struct gnupg_comopt_s comopt;
gpg_error_t parse_comopt (int module_id, int verbose);