From 6985a179c18361e1fa4e7491397e826924780e54 Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 11 Oct 2017 17:03:21 +0200 Subject: [PATCH] libpkgconf: Fix issue when sysroot is '/' If sysroot is /, simply do nothing. This fixes #146 --- libpkgconf/tuple.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libpkgconf/tuple.c b/libpkgconf/tuple.c index b0cda45..0b22b9a 100644 --- a/libpkgconf/tuple.c +++ b/libpkgconf/tuple.c @@ -292,6 +292,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) {