summaryrefslogtreecommitdiffstats
path: root/crypto/mem.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-04-01 15:46:03 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-04-01 15:46:03 +0000
commitc4acfb1fd049f52fb074b103be01cab5cf5c04f8 (patch)
tree71bdfa6dc516553d2cefea531d8aa2591dc60357 /crypto/mem.c
parent3f7468318dc56f34e1c5e98049b70558fea586b0 (diff)
Add additional OPENSSL_init() handling add dummy call to (hopefully)
ensure OPENSSL_init() is always linked into an application.
Diffstat (limited to 'crypto/mem.c')
-rw-r--r--crypto/mem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index 347c0d8184..7bd29d6766 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -121,10 +121,13 @@ static void (*set_debug_options_func)(long) = NULL;
static long (*get_debug_options_func)(void) = NULL;
#endif
+extern void OPENSSL_init(void);
int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t),
void (*f)(void *))
{
+ /* Dummy call just to ensure OPENSSL_init() gets linked in */
+ OPENSSL_init();
if (!allow_customize)
return 0;
if ((m == 0) || (r == 0) || (f == 0))