1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-04-13 22:21:09 +02:00

Fix linker problem on OS X.

* common/init.c (default_errsource): Move to the .data segmemt.
--

See mails starting at
 http://lists.gnupg.org/pipermail/gnupg-devel/2014-November/029089.html
This commit is contained in:
Werner Koch 2014-11-19 10:34:32 +01:00
parent 164a6a9dd4
commit cd2c6f36fe

View File

@ -67,8 +67,11 @@ static mem_cleanup_item_t mem_cleanup_list;
/* The default error source of the application. This is different /* The default error source of the application. This is different
from GPG_ERR_SOURCE_DEFAULT in that it does not depend on the from GPG_ERR_SOURCE_DEFAULT in that it does not depend on the
source file and thus is usable in code shared by applications. */ source file and thus is usable in code shared by applications.
gpg_err_source_t default_errsource; Note that we need to initialize it because otherwise some linkers
(OS X at least) won't find the symbol when linking the t-*.c
files. */
gpg_err_source_t default_errsource = 0;
#ifdef HAVE_W32CE_SYSTEM #ifdef HAVE_W32CE_SYSTEM
@ -145,7 +148,7 @@ writestring_via_estream (int mode, const char *string)
void void
_init_common_subsystems (gpg_err_source_t errsource, int *argcp, char ***argvp) _init_common_subsystems (gpg_err_source_t errsource, int *argcp, char ***argvp)
{ {
/* Store the error source in a gloabl variable. */ /* Store the error source in a global variable. */
default_errsource = errsource; default_errsource = errsource;
atexit (run_mem_cleanup); atexit (run_mem_cleanup);