01-dlopen-musl.patch 928 B

1234567891011121314
  1. --- contrib/restricted/aws/aws-c-cal/source/unix/openssl_platform_init.c (index)
  2. +++ contrib/restricted/aws/aws-c-cal/source/unix/openssl_platform_init.c (working tree)
  3. @@ -489,7 +489,11 @@ static enum aws_libcrypto_version s_resolve_libcrypto(void) {
  4. /* Try to auto-resolve against what's linked in/process space */
  5. AWS_LOGF_DEBUG(AWS_LS_CAL_LIBCRYPTO_RESOLVE, "searching process and loaded modules");
  6. void *process = dlopen(NULL, RTLD_NOW);
  7. +#if 0
  8. + // dlopen is not supported in musl. It's ok to pass NULL to s_resolve_libcrypto_symbols,
  9. + // as dlsym handles it well according to man.
  10. AWS_FATAL_ASSERT(process && "Unable to load symbols from process space");
  11. +#endif
  12. enum aws_libcrypto_version result = s_resolve_libcrypto_symbols(AWS_LIBCRYPTO_LC, process);
  13. if (result == AWS_LIBCRYPTO_NONE) {
  14. AWS_LOGF_DEBUG(AWS_LS_CAL_LIBCRYPTO_RESOLVE, "did not find aws-lc symbols linked");