Protect call to setlocale() with HAVE_SETLOCALE
This commit is contained in:
@@ -245,7 +245,9 @@ expand_iolog_path(const char *prefix, const char *dir, const char *file,
|
|||||||
buf = erealloc(buf, psize);
|
buf = erealloc(buf, psize);
|
||||||
buf[psize - 1] = '\0';
|
buf[psize - 1] = '\0';
|
||||||
} while (!strftime(buf, psize, path, timeptr) || buf[psize - 1] != '\0');
|
} while (!strftime(buf, psize, path, timeptr) || buf[psize - 1] != '\0');
|
||||||
|
#ifdef HAVE_SETLOCALE
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
|
#endif
|
||||||
if (slashp)
|
if (slashp)
|
||||||
*slashp = buf + (*slashp - path);
|
*slashp = buf + (*slashp - path);
|
||||||
efree(path);
|
efree(path);
|
||||||
|
Reference in New Issue
Block a user