RT4315: Fix UEFI build in crypto/init.c
authorDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 17 Feb 2016 14:54:33 +0000 (14:54 +0000)
committerRich Salz <rsalz@openssl.org>
Wed, 17 Feb 2016 15:07:30 +0000 (10:07 -0500)
We don't have atexit() in the EDK2 environment. Firmware never exits.

Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
crypto/init.c

index 25e3dc7..c7eff8b 100644 (file)
@@ -270,7 +270,9 @@ static void ossl_init_base(void)
     fprintf(stderr, "OPENSSL_INIT: ossl_init_base: Setting up stop handlers\n");
 #endif
     ossl_init_setup_thread_stop();
     fprintf(stderr, "OPENSSL_INIT: ossl_init_base: Setting up stop handlers\n");
 #endif
     ossl_init_setup_thread_stop();
+#ifndef OPENSSL_SYS_UEFI
     atexit(OPENSSL_cleanup);
     atexit(OPENSSL_cleanup);
+#endif
     OPENSSL_cpuid_setup();
     base_inited = 1;
 }
     OPENSSL_cpuid_setup();
     base_inited = 1;
 }