author | Rich Felker <dalias@aerifal.cx> | 2014年05月29日 21:01:32 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014年05月29日 21:01:32 -0400 |
commit | dd5f50da6f6c3df5647e922e47f8568a8896a752 (patch) | |
tree | c5ab9a1006d2ab4c449f8fa922ce3237acad30e4 /src/stdio/tmpfile.c | |
parent | 2e55da911896a91e95b24ab5dc8a9d9b0718f4de (diff) | |
download | musl-dd5f50da6f6c3df5647e922e47f8568a8896a752.tar.gz |
-rw-r--r-- | src/stdio/tmpfile.c | 4 |
diff --git a/src/stdio/tmpfile.c b/src/stdio/tmpfile.c index c8569948..a7d0000a 100644 --- a/src/stdio/tmpfile.c +++ b/src/stdio/tmpfile.c @@ -17,7 +17,11 @@ FILE *tmpfile(void) fd = sys_open(s, O_RDWR|O_CREAT|O_EXCL, 0600); if (fd >= 0) { f = __fdopen(fd, "w+"); +#ifdef SYS_unlink __syscall(SYS_unlink, s); +#else + __syscall(SYS_unlinkat, AT_FDCWD, s, 0); +#endif return f; } } |