From: Arran Cudbard-Bell Date: Thu, 17 Nov 2022 20:52:26 +0000 (-0600) Subject: Modules have prefixes other than rlm_ now 🙄 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=545476402d33175e9bad2e7a01456d3f440e2614;p=thirdparty%2Ffreeradius-server.git Modules have prefixes other than rlm_ now 🙄 --- diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index 5629bdeff8f..19e8e69591e 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -1773,10 +1773,14 @@ static void add_minus_l(count_chars *cc, char const *arg) char *name = strrchr(arg, '/'); char *file = strrchr(arg, '.'); + /* + * Most linkers require the -l argument value + * to be stripped of its 'lib' prefix. + */ if ((name != NULL) && (file != NULL) && (strstr(name, "lib") == (name + 1))) { - *name = '\0'; - *file = '\0'; + *name = '\0'; /* trim path */ + *file = '\0'; /* trim extension */ file = name; file = file+4; push_count_chars(cc, "-L"); @@ -1787,10 +1791,12 @@ static void add_minus_l(count_chars *cc, char const *arg) strcat(newarg, file); push_count_chars(cc, newarg); } - /* special case for FreeRADIUS loadable modules */ - else if ((name != NULL) && (file != NULL) && - (strstr(name, "rlm_") == (name + 1))) { - *name = '\0'; + /* + * For things which aren't libs, don't strip + * anything. + */ + else if ((name != NULL) && (file != NULL)) { + *name = '\0'; /* trim path */ file = name+1; push_count_chars(cc, "-L"); push_count_chars(cc, arg);