mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:47:35 +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:
parent
2fe6b3725a
commit
dd924b730a
14 changed files with 15 additions and 16 deletions
|
@ -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) {
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#ifndef KERNEL
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define NULL nullptr
|
||||
|
|
|
@ -993,7 +993,7 @@ void dbgputch(char ch)
|
|||
syscall(SC_dbgputch, ch);
|
||||
}
|
||||
|
||||
int dbgputstr(const char* characters, int length)
|
||||
ssize_t dbgputstr(const char* characters, ssize_t length)
|
||||
{
|
||||
int rc = syscall(SC_dbgputstr, characters, length);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
|
|
|
@ -93,7 +93,7 @@ int fprintf(FILE*, const char* fmt, ...);
|
|||
int printf(const char* fmt, ...);
|
||||
int dbgprintf(const char* fmt, ...);
|
||||
void dbgputch(char);
|
||||
int dbgputstr(const char*, ssize_t);
|
||||
ssize_t dbgputstr(const char*, ssize_t);
|
||||
int sprintf(char* buffer, const char* fmt, ...);
|
||||
int snprintf(char* buffer, size_t, const char* fmt, ...);
|
||||
int putchar(int ch);
|
||||
|
|
|
@ -41,13 +41,13 @@ Value evaluate(const ByteBuffer& bytes, const PtraceRegisters& regs)
|
|||
|
||||
switch (static_cast<Operations>(opcode)) {
|
||||
case Operations::RegEbp: {
|
||||
int offset = 0;
|
||||
ssize_t offset = 0;
|
||||
stream.read_LEB128_signed(offset);
|
||||
return Value { Type::UnsignedIntetger, regs.ebp + offset };
|
||||
}
|
||||
|
||||
case Operations::FbReg: {
|
||||
int offset = 0;
|
||||
ssize_t offset = 0;
|
||||
stream.read_LEB128_signed(offset);
|
||||
return Value { Type::UnsignedIntetger, regs.ebp + 2 * sizeof(size_t) + offset };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue