mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
daemon: Fix dlsearchpath while running from build tree
It appears that, libltdl will find the .la file in the builddir and figure out where the real .so is. This also requires .ifexists to be fixed up to correspondingly search in <dlsearchpath>/.libs.
This commit is contained in:
parent
4cd7e6df1d
commit
3d7bc637c4
2 changed files with 12 additions and 2 deletions
|
|
@ -2062,11 +2062,21 @@ int pa_cli_command_execute_line_stateful(pa_core *c, const char *s, pa_strbuf *b
|
|||
char *pathname;
|
||||
|
||||
pathname = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", p, filename);
|
||||
pa_xfree(p);
|
||||
|
||||
*ifstate = access(pathname, F_OK) == 0 ? IFSTATE_TRUE : IFSTATE_FALSE;
|
||||
pa_log_debug("Checking for existence of '%s': %s", pathname, *ifstate == IFSTATE_TRUE ? "success" : "failure");
|
||||
|
||||
if (PA_UNLIKELY(pa_run_from_build_tree())) {
|
||||
/* If run from the build tree, search in <path>/.libs as well */
|
||||
char *ltpathname = pa_sprintf_malloc("%s" PA_PATH_SEP ".libs" PA_PATH_SEP "%s", p, filename);
|
||||
|
||||
*ifstate = access(ltpathname, F_OK) == 0 ? IFSTATE_TRUE : IFSTATE_FALSE;
|
||||
pa_log_debug("Checking for existence of '%s': %s", ltpathname, *ifstate == IFSTATE_TRUE ? "success" : "failure");
|
||||
|
||||
pa_xfree(ltpathname);
|
||||
}
|
||||
|
||||
pa_xfree(p);
|
||||
pa_xfree(pathname);
|
||||
|
||||
if (*ifstate == IFSTATE_TRUE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue