path: relocate system libdir/includedir if appropriate

feature/tap-sh
William Pitcock 2017-01-13 20:12:38 -06:00
parent cb1dc71e23
commit 147fd80750
1 changed files with 7 additions and 1 deletions

View File

@ -77,6 +77,8 @@ void
pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter)
{
pkgconf_path_t *node;
char path[PKGCONF_BUFSIZE];
#ifdef PKGCONF_CACHE_INODES
struct stat st;
@ -90,8 +92,12 @@ pkgconf_path_add(const char *text, pkgconf_list_t *dirlist, bool filter)
return;
#endif
pkgconf_strlcpy(path, text, sizeof path);
pkgconf_path_relocate(path, sizeof path);
node = calloc(sizeof(pkgconf_path_t), 1);
node->path = strdup(text);
node->path = strdup(path);
#ifdef PKGCONF_CACHE_INODES
if (filter) {
node->handle_path = (void *)(intptr_t) st.st_ino;