Skip to content
Snippets Groups Projects
Commit 7604a0f0 authored by Ludovico de Nittis's avatar Ludovico de Nittis
Browse files

utils: Find prefix if called from statically-linked installed-test


Without this knowledge, `_srt_find_myself()` will fail to return the
right prefix for statically-linked installed tests.

Signed-off-by: default avatarLudovico de Nittis <ludovico.denittis@collabora.com>
parent 20cb147c
No related branches found
No related tags found
1 merge request!224Backport the new json_from_string() function
......@@ -156,6 +156,8 @@ _srt_check_not_setuid (void)
MULTIARCH_LIBDIR "/steam-runtime-tools-" _SRT_API_MAJOR
#define PKGLIBEXECDIR \
"/libexec/steam-runtime-tools-" _SRT_API_MAJOR
#define INSTALLED_TESTS_PKGLIBEXECDIR \
"/libexec/installed-tests/steam-runtime-tools-" _SRT_API_MAJOR
/**
* _srt_process_timeout_wait_status:
......@@ -263,6 +265,8 @@ _srt_find_myself (const char **helpers_path_out,
dir[strlen (dir) - strlen (MULTIARCH_LIBDIR)] = '\0';
else if (g_str_has_suffix (dir, PKGLIBEXECDIR))
dir[strlen (dir) - strlen (PKGLIBEXECDIR)] = '\0';
else if (g_str_has_suffix (dir, INSTALLED_TESTS_PKGLIBEXECDIR))
dir[strlen (dir) - strlen (INSTALLED_TESTS_PKGLIBEXECDIR)] = '\0';
else if (g_str_has_suffix (dir, "/libexec"))
dir[strlen (dir) - strlen ("/libexec")] = '\0';
else if (g_str_has_suffix (dir, "/lib64"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment