size_t bufsize) {
size_t bufused;
// TODO: Remove the cast on `buf` once the witx is updated with char8 support.
- __wasi_errno_t error = __wasi_path_readlink(fd, path, strlen(path),
+ __wasi_errno_t error = __wasi_path_readlink(fd, path,
(uint8_t*)buf, bufsize, &bufused);
if (error != 0) {
errno = errno_fixup_directory(fd, error);