Small patch

Behdad Esfahbod <[email protected]>
Newsgroups gmane.comp.fonts.fontconfig
Message-ID <CAF63+7V+_hqS86j-1WBsfw7dWj9hV3PWA20DpQPjjPYH=ebRNw@mail.gmail.com>
See attached. I haven't reviewed or tested, but sounds correct. Not sure
how Tom was getting open errors without using sysroot though.

-- 
behdad
http://behdad.org/

_______________________________________________
Fontconfig mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/fontconfig
0001-Use-realfilename-for-FcOpen-in-_FcConfigParse.patch (text/x-patch, 970 B)
From 284bf0613b4e9635ad0428da58005341d3487e9d Mon Sep 17 00:00:00 2001
From: Tom Anderson <[email protected]>
Date: Wed, 11 Apr 2018 17:24:43 -0700
Subject: [PATCH] Use realfilename for FcOpen in _FcConfigParse

realfilename is the file name after sysroot adjustments.  It should be used
instead of filename in the call to FcOpen() which forwards the name directly to
open().

Though I don't explicitly request a sysroot, I was getting error messages saying
"failed reading config file".  This CL fixes the error spam.
---
 src/fcxml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fcxml.c b/src/fcxml.c
index 7c8aaac..aa6612d 100644
--- a/src/fcxml.c
+++ b/src/fcxml.c
@@ -3443,7 +3443,7 @@ _FcConfigParse (FcConfig	*config,
 
     FcStrBufInit (&sbuf, NULL, 0);
 
-    fd = FcOpen ((char *) filename, O_RDONLY);
+    fd = FcOpen ((char *) realfilename, O_RDONLY);
     if (fd == -1)
 	goto bail1;
 
-- 
2.17.0.484.g0c8726318c-goog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.