]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/src/stdio/__stdio_close.c
a99aa078d3e3f9f1db85ccba0a5cdf3da80837b3
[wasi-libc.git] / libc-top-half / musl / src / stdio / __stdio_close.c
1 #ifdef __wasilibc_unmodified_upstream
2 #else
3 #include <unistd.h>
4 #endif
5 #include "stdio_impl.h"
6
7 static int dummy(int fd)
8 {
9 return fd;
10 }
11
12 weak_alias(dummy, __aio_close);
13
14 int __stdio_close(FILE *f)
15 {
16 #ifdef __wasilibc_unmodified_upstream
17 return syscall(SYS_close, __aio_close(f->fd));
18 #else
19 return close(__aio_close(f->fd));
20 #endif
21 }