aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordakovalkov <dakovalkov@yandex-team.com>2023-11-22 11:58:47 +0300
committerdakovalkov <dakovalkov@yandex-team.com>2023-11-22 14:17:51 +0300
commit79f29f21f1bc68f2f7b0e7a829447b85b5d11322 (patch)
treedb1f1390c1882efbbea3da4fdbd0db42a7221d54
parenta6890e7c54269b8a381690af3437c410ef425570 (diff)
downloadydb-79f29f21f1bc68f2f7b0e7a829447b85b5d11322.tar.gz
Fix failed assert in aws-c-cal with musl
-rw-r--r--contrib/restricted/aws/aws-c-cal/source/unix/openssl_platform_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/restricted/aws/aws-c-cal/source/unix/openssl_platform_init.c b/contrib/restricted/aws/aws-c-cal/source/unix/openssl_platform_init.c
index f6ebd59945..9a1d43e3d5 100644
--- a/contrib/restricted/aws/aws-c-cal/source/unix/openssl_platform_init.c
+++ b/contrib/restricted/aws/aws-c-cal/source/unix/openssl_platform_init.c
@@ -489,7 +489,11 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
/* Try to auto-resolve against what's linked in/process space */
AWS_LOGF_DEBUG(AWS_LS_CAL_LIBCRYPTO_RESOLVE, "searching process and loaded modules");
void *process = dlopen(NULL, RTLD_NOW);
+#if 0
+ // dlopen is not supported in musl. It's ok to pass NULL to s_resolve_libcrypto_symbols,
+ // as dlsym handles it well according to man.
AWS_FATAL_ASSERT(process && "Unable to load symbols from process space");
+#endif
enum aws_libcrypto_version result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_LC, process);
if (result == AWS_LIBCRYPTO_NONE) {
AWS_LOGF_DEBUG(AWS_LS_CAL_LIBCRYPTO_RESOLVE, "did not find aws-lc symbols linked");