mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-01-30 00:00:29 +01:00
Clean up sysroot support a little bit
This should fix bug #16905 properly.
This commit is contained in:
parent
25e8ca84ac
commit
66d49f1375
1 changed files with 15 additions and 26 deletions
41
pkg.c
41
pkg.c
|
|
@ -479,33 +479,22 @@ string_list_to_string (GSList *list)
|
|||
char *retval;
|
||||
|
||||
tmp = list;
|
||||
while (tmp != NULL)
|
||||
{
|
||||
char *tmpstr = (char*) tmp->data;
|
||||
if (pcsysrootdir != NULL)
|
||||
{
|
||||
if (tmpstr[0] == '-' &&
|
||||
(tmpstr[1] == 'I' ||
|
||||
tmpstr[1] == 'L'))
|
||||
{
|
||||
g_string_append_c (str, '-');
|
||||
g_string_append_c (str, tmpstr[1]);
|
||||
g_string_append (str, pcsysrootdir);
|
||||
g_string_append (str, tmpstr+2);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_string_append (str, tmpstr);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_string_append (str, tmpstr);
|
||||
}
|
||||
g_string_append_c (str, ' ');
|
||||
|
||||
tmp = g_slist_next (tmp);
|
||||
while (tmp != NULL) {
|
||||
char *tmpstr = (char*) tmp->data;
|
||||
if (pcsysrootdir != NULL &&
|
||||
tmpstr[0] == '-' &&
|
||||
(tmpstr[1] == 'I' ||
|
||||
tmpstr[1] == 'L')) {
|
||||
g_string_append_c (str, '-');
|
||||
g_string_append_c (str, tmpstr[1]);
|
||||
g_string_append (str, pcsysrootdir);
|
||||
g_string_append (str, tmpstr+2);
|
||||
} else {
|
||||
g_string_append (str, tmpstr);
|
||||
}
|
||||
g_string_append_c (str, ' ');
|
||||
tmp = g_slist_next (tmp);
|
||||
}
|
||||
|
||||
retval = str->str;
|
||||
g_string_free (str, FALSE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue