]>
git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/cloudlibc/src/libc/unistd/readlinkat.c
4341e60673026dd2a52305c44fbb63bb37e1e779
1 // Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/
3 // SPDX-License-Identifier: BSD-2-Clause
5 #include <common/errno.h>
12 ssize_t
readlinkat(int fd
, const char *restrict path
, char *restrict buf
,
15 #ifdef __wasilibc_unmodified_upstream
16 __wasi_errno_t error
= __wasi_file_readlink(fd
, path
, strlen(path
),
18 __wasi_errno_t error
= __wasi_path_readlink(fd
, path
, strlen(path
),
20 buf
, bufsize
, &bufused
);
22 errno
= errno_fixup_directory(fd
, error
);