about summary refs log tree commit diff
path: root/src/stdio/tmpfile.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-05-24 22:54:05 -0400
committerRich Felker <dalias@aerifal.cx>2014-05-24 22:54:05 -0400
commit594c827a22124ae550b9a877b8188e0898dff8db (patch)
treef48f403bf1b6aa543f20783fa501c573aaa3a63e /src/stdio/tmpfile.c
parent44d28e55121f9a7d736df59c09b963e17c8c4cfa (diff)
downloadmusl-594c827a22124ae550b9a877b8188e0898dff8db.tar.gz
musl-594c827a22124ae550b9a877b8188e0898dff8db.tar.xz
musl-594c827a22124ae550b9a877b8188e0898dff8db.zip
support kernels with no SYS_open syscall, only SYS_openat
open is handled specially because it is used from so many places, in
so many variants (2 or 3 arguments, setting errno or not, and
cancellable or not). trying to do it as a function would not only
increase bloat, but would also risk subtle breakage.

this is the first step towards supporting "new" archs where linux
lacks "old" syscalls.
Diffstat (limited to 'src/stdio/tmpfile.c')
-rw-r--r--src/stdio/tmpfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/tmpfile.c b/src/stdio/tmpfile.c
index 926d6601..b0d0ba07 100644
--- a/src/stdio/tmpfile.c
+++ b/src/stdio/tmpfile.c
@@ -14,7 +14,7 @@ FILE *tmpfile(void)
 	for (try=0; try<MAXTRIES; try++) {
 		s = tmpnam(buf);
 		if (!s) return 0;
-		fd = syscall(SYS_open, s, O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600);
+		fd = sys_open(s, O_RDWR|O_CREAT|O_EXCL, 0600);
 		if (fd >= 0) {
 			f = __fdopen(fd, "w+");
 			__syscall(SYS_unlink, s);