]> git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/cloudlibc/src/common/errno.h
Update README and add CI-tests for minimal supported LLVM-version (10) (#302)
[wasi-libc.git] / libc-bottom-half / cloudlibc / src / common / errno.h
1 // Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/
2 //
3 // SPDX-License-Identifier: BSD-2-Clause
4
5 #ifndef COMMON_ERRNO_H
6 #define COMMON_ERRNO_H
7
8 #include <wasi/api.h>
9
10 // WASI syscalls should just return ENOTDIR if that's what the problem is.
11 static inline __wasi_errno_t errno_fixup_directory(__wasi_fd_t fd,
12 __wasi_errno_t error) {
13 return error;
14 }
15
16 // WASI syscalls should just return ENOTSOCK if that's what the problem is.
17 static inline __wasi_errno_t errno_fixup_socket(__wasi_fd_t fd,
18 __wasi_errno_t error) {
19 return error;
20 }
21
22 #endif