diff options
Diffstat (limited to 'StdLib/LibC/Stdio/tmpfile.c')
-rw-r--r-- | StdLib/LibC/Stdio/tmpfile.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/StdLib/LibC/Stdio/tmpfile.c b/StdLib/LibC/Stdio/tmpfile.c index bfcf77c49d..97040d58f2 100644 --- a/StdLib/LibC/Stdio/tmpfile.c +++ b/StdLib/LibC/Stdio/tmpfile.c @@ -68,8 +68,12 @@ tmpfile() //(void)sigprocmask(SIG_BLOCK, &set, &oset);
fd = mkstemp(buf);
- if (fd != -1)
- (void)unlink(buf);
+ if (fd != -1) {
+ /* Changed from unlink(buf) because of differences between the behavior
+ of Unix and UEFI file systems.
+ */
+ (void)DeleteOnClose(fd);
+ }
//(void)sigprocmask(SIG_SETMASK, &oset, NULL);
|