Improve LLVM compatibility a little bit
This commit is contained in:
@ -35,7 +35,7 @@ FILE *tmpfile(void) {
|
||||
char *tmp, *sep, tpl[PATH_MAX];
|
||||
tmp = firstnonnull(getenv("TMPDIR"), kTmpPath);
|
||||
sep = !isempty(tmp) && !endswith(tmp, "/") ? "/" : "";
|
||||
if (snprintf(tpl, PATH_MAX, "%s%stmp.XXXXXX", tmp, sep) < PATH_MAX) {
|
||||
if ((snprintf)(tpl, PATH_MAX, "%s%stmp.XXXXXX", tmp, sep) < PATH_MAX) {
|
||||
if ((fd = mkostemps(tpl, 0, 0)) != -1) {
|
||||
return fdopen(fd, "w+");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user