From 54906bf9035cc2b7795f265db9bdc7b4c9d2adb6 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 e105adc..83b2634 100644 --- a/libpkgconf/tuple.c +++ b/libpkgconf/tuple.c @@ -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) {