Add an OPENSSL_NO_AUTOERRINIT option
[oweals/openssl.git] / crypto / init.c
index 856b06afddde245888dd8e1e14de83a28f27ad7c..bce8438b9561d9b02515009e6223eb613606c001 100644 (file)
@@ -282,7 +282,11 @@ static void ossl_init_no_load_crypto_strings(void)
 
 static void ossl_init_load_crypto_strings(void)
 {
-#ifndef OPENSSL_NO_ERR
+    /*
+     * OPENSSL_NO_AUTOERRINIT is provided here to prevent at compile time
+     * pulling in all the error strings during static linking
+     */
+#if !defined(OPENSSL_NO_ERR) && !defined(OPENSSL_NO_AUTOERRINIT)
 # ifdef OPENSSL_INIT_DEBUG
     fprintf(stderr, "OPENSSL_INIT: ossl_init_load_crypto_strings: "
                     "err_load_crypto_strings_intern()\n");