]> git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/sources/__wasilibc_fd_renumber.c
WASI libc prototype implementation.
[wasi-libc.git] / libc-bottom-half / sources / __wasilibc_fd_renumber.c
1 #include <wasi/core.h>
2 #include <errno.h>
3 #include <unistd.h>
4
5 int __wasilibc_fd_renumber(int fd, int newfd) {
6 __wasi_errno_t error = __wasi_fd_renumber(fd, newfd);
7 if (error != 0) {
8 errno = error;
9 return -1;
10 }
11 return 0;
12 }