Use dlsym() for token load if dlvsym() is not available.

To be discussed. Anyway, we need to support distros with musl...
This commit is contained in:
Milan Broz
2021-08-22 10:59:08 +02:00
parent 53b22cc32e
commit 5f2c751dd8

View File

@@ -63,9 +63,13 @@ static void *token_dlvsym(struct crypt_device *cd,
char *error;
void *sym;
#ifdef HAVE_DLVSYM
log_dbg(cd, "Loading symbol %s@%s.", symbol, version);
sym = dlvsym(handle, symbol, version);
#else
log_dbg(cd, "Loading default version of symbol %s.", symbol);
sym = dlsym(handle, symbol);
#endif
error = dlerror();
if (error)