libpkgconf: Fix issue when sysroot is '/'

If sysroot is /, simply do nothing.

This fixes #146
Baptiste Daroussin 2017-10-11 17:03:21 +02:00 committed by William Pitcock
parent 53e255204c
commit 54906bf903
1 changed files with 1 additions and 0 deletions

View File

@ -291,6 +291,7 @@ pkgconf_tuple_parse(const pkgconf_client_t *client, pkgconf_list_t *vars, const
*/
if (*buf == '/' &&
client->sysroot_dir != NULL &&
strcmp(client->sysroot_dir, "/") != 0 &&
strlen(buf) > strlen(client->sysroot_dir) &&
strstr(buf + strlen(client->sysroot_dir), client->sysroot_dir) != NULL)
{