From 9b00524ab93d879d199abb12b83c9768384dfb8d Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Mon, 10 Jun 2019 19:04:18 +0200
Subject: Fix for gcc2 and test-bz106632


diff --git a/fc-cache/fc-cache.c b/fc-cache/fc-cache.c
index 091eed4..5a9fa94 100644
--- a/fc-cache/fc-cache.c
+++ b/fc-cache/fc-cache.c
@@ -142,6 +142,7 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
     FcBool	    was_valid, was_processed = FcFalse;
     int		    i;
     const FcChar8   *sysroot = FcConfigGetSysRoot (config);
+    FcChar8 *rooted_dir = NULL;
 
     /*
      * Now scan all of the directories into separate databases
@@ -164,7 +165,6 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
 	    continue;
 	}
 
-    FcChar8 *rooted_dir = NULL;
     if (sysroot)
     {
         rooted_dir = FcStrPlus(sysroot, dir);
diff --git a/src/fccfg.c b/src/fccfg.c
index e81eeba..c389683 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -2349,11 +2349,13 @@ FcConfigRealFilename (FcConfig		*config,
 	    if (!FcStrIsAbsoluteFilename (buf))
 	    {
 		FcChar8 *dirname = FcStrDirname (nn);
+		FcChar8 *path;
+
 		FcStrFree (nn);
 		if (!dirname)
 		    return NULL;
 
-		FcChar8 *path = FcStrBuildFilename (dirname, buf, NULL);
+		path = FcStrBuildFilename (dirname, buf, NULL);
 		FcStrFree (dirname);
 		if (!path)
 		    return NULL;
-- 
2.23.0

