]> git.saurik.com Git - apple/libc.git/blobdiff - locale/FreeBSD/setrunelocale.c
Libc-1158.1.2.tar.gz
[apple/libc.git] / locale / FreeBSD / setrunelocale.c
index fbb2275349c51696a8fe816746f5cc18bed80731..213a62b9d4eaf8cb73dd9b50424fb0c3d8a0bc8e 100644 (file)
@@ -107,12 +107,10 @@ __setrunelocale(const char *encoding, locale_t loc)
         */
 
        /* Range checking not needed, encoding length already checked before */
-       (void) strcpy(name, _PathLocale);
-       (void) strcat(name, "/");
-       (void) strcat(name, encoding);
+       (void) strcpy(name, encoding);
        (void) strcat(name, "/LC_CTYPE");
 
-       if ((fp = fopen(name, "r")) == NULL)
+       if ((fp = fdopen(__open_path_locale(name), "r")) == NULL)
                return (errno == 0 ? ENOENT : errno);
 
        if ((xrl = _Read_RuneMagi(fp)) == NULL) {