1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

Kernel+LibC: Fix various build issues introduced by ssize_t

Now that ssize_t is derived from size_t, we have to
This commit is contained in:
Andreas Kling 2020-05-23 15:27:33 +02:00
parent 2fe6b3725a
commit dd924b730a
14 changed files with 15 additions and 16 deletions

View file

@ -103,7 +103,7 @@ static int allocate_dirp_buffer(DIR* dirp)
errno = old_errno;
return new_errno;
}
size_t size_to_allocate = max(st.st_size, 4096);
size_t size_to_allocate = max(st.st_size, static_cast<off_t>(4096));
dirp->buffer = (char*)malloc(size_to_allocate);
ssize_t nread = syscall(SC_get_dir_entries, dirp->fd, dirp->buffer, size_to_allocate);
if (nread < 0) {