1 From: Emil Lerch <emil@lerch.org>
2 Date: Wed, 28 Apr 2021 17:46:24 -0700
3 Subject: [PATCH] Allow dlopen to fail on musl systems
5 Now that references are forced when linking statically, the assertion is
6 no longer necessary. See https://github.com/awslabs/aws-c-cal/pull/54
8 source/unix/openssl_platform_init.c | 5 +++--
9 1 file changed, 3 insertions(+), 2 deletions(-)
11 diff --git a/source/unix/openssl_platform_init.c b/source/unix/openssl_platform_init.c
12 index 5266ecc1..99f210bd 100644
13 --- a/source/unix/openssl_platform_init.c
14 +++ b/source/unix/openssl_platform_init.c
15 @@ -496,7 +502,6 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
16 /* Try to auto-resolve against what's linked in/process space */
17 FLOGF("searching process and loaded modules");
18 void *process = dlopen(NULL, RTLD_NOW);
19 - AWS_FATAL_ASSERT(process && "Unable to load symbols from process space");
20 enum aws_libcrypto_version result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_LC, process);
21 if (result == AWS_LIBCRYPTO_NONE) {
22 result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_0_2, process);
23 @@ -504,7 +509,9 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
24 if (result == AWS_LIBCRYPTO_NONE) {
25 result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_1_1_1, process);
32 if (result == AWS_LIBCRYPTO_NONE) {
33 FLOGF("libcrypto symbols were not statically linked, searching for shared libraries");