From: Alan T. DeKok Date: Mon, 4 Nov 2019 21:06:30 +0000 (-0500) Subject: lowercase library names, and mash '-' to '_' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4413692d1f6fb5f5dbc5003c5dbd2a68e917e2c;p=thirdparty%2Ffreeradius-server.git lowercase library names, and mash '-' to '_' --- diff --git a/src/lib/util/dl.c b/src/lib/util/dl.c index b5b3e2eb3a5..bc9e4be2f0e 100644 --- a/src/lib/util/dl.c +++ b/src/lib/util/dl.c @@ -228,8 +228,15 @@ int dl_symbol_init(dl_loader_t *dl_loader, dl_t const *dl) init; init = fr_cursor_next(&cursor)) { if (init->symbol) { + char *p; + snprintf(buffer, sizeof(buffer), "%s_%s", dl->name, init->symbol); + for (p = buffer; *p != '\0'; p++) { + if (isupper((int) *p)) *p = tolower((int) *p); + if (*p == '-') *p = '_'; + } + sym = dlsym(dl->handle, buffer); if (!sym) { continue;