Fixed compilation errors

This commit is contained in:
DH 2023-07-12 05:22:44 +03:00
parent 98d3e30a22
commit fa2db8ed4b
11 changed files with 44 additions and 42 deletions

View file

@ -13,6 +13,8 @@ using SceKernelModule = ModuleHandle;
struct ModuleInfo;
struct ModuleInfoEx;
struct KEvent;
struct timespec;
struct stack_t;
@ -211,11 +213,11 @@ SysResult sys_shmat(Thread *thread, sint shmid, ptr<const void> shmaddr,
SysResult sys_shmdt(Thread *thread, ptr<const void> shmaddr);
SysResult sys_shmget(Thread *thread, key_t key, size_t size, sint shmflg);
SysResult sys_clock_gettime(Thread *thread, clockid_t clock_id,
ptr<struct timespec> tp);
ptr<timespec> tp);
SysResult sys_clock_settime(Thread *thread, clockid_t clock_id,
ptr<const struct timespec> tp);
ptr<const timespec> tp);
SysResult sys_clock_getres(Thread *thread, clockid_t clock_id,
ptr<struct timespec> tp);
ptr<timespec> tp);
SysResult sys_ktimer_create(Thread *thread, clockid_t clock_id,
ptr<struct sigevent> evp, ptr<sint> timerid);
SysResult sys_ktimer_delete(Thread *thread, sint timerid);
@ -225,8 +227,8 @@ SysResult sys_ktimer_settime(Thread *thread, sint timerid, sint flags,
SysResult sys_ktimer_gettime(Thread *thread, sint timerid,
ptr<struct itimerspec> value);
SysResult sys_ktimer_getoverrun(Thread *thread, sint timerid);
SysResult sys_nanosleep(Thread *thread, ptr<const struct timespec> rqtp,
ptr<struct timespec> rmtp);
SysResult sys_nanosleep(Thread *thread, ptr<const timespec> rqtp,
ptr<timespec> rmtp);
SysResult sys_ntp_gettime(Thread *thread, ptr<struct ntptimeval> ntvp);
SysResult sys_minherit(Thread *thread, ptr<void> addr, size_t len,
sint inherit);
@ -270,7 +272,7 @@ SysResult sys_setresuid(Thread *thread, uid_t ruid, uid_t euid, uid_t suid);
SysResult sys_setresgid(Thread *thread, gid_t rgid, gid_t egid, gid_t sgid);
SysResult sys_aio_return(Thread *thread, ptr<struct aiocb> aiocbp);
SysResult sys_aio_suspend(Thread *thread, ptr<struct aiocb> aiocbp, sint nent,
ptr<const struct timespec> timeout);
ptr<const timespec> timeout);
SysResult sys_aio_cancel(Thread *thread, sint fd, ptr<struct aiocb> aiocbp);
SysResult sys_aio_error(Thread *thread, ptr<struct aiocb> aiocbp);
SysResult sys_oaio_read(Thread *thread, ptr<struct aiocb> aiocbp);
@ -293,7 +295,7 @@ SysResult sys_sched_yield(Thread *thread);
SysResult sys_sched_get_priority_max(Thread *thread, sint policy);
SysResult sys_sched_get_priority_min(Thread *thread, sint policy);
SysResult sys_sched_rr_get_interval(Thread *thread, pid_t pid,
ptr<struct timespec> interval);
ptr<timespec> interval);
SysResult sys_utrace(Thread *thread, ptr<const void> addr, size_t len);
SysResult sys_kldsym(Thread *thread, sint fileid, sint cmd, ptr<void> data);
SysResult sys_jail(Thread *thread, ptr<struct jail> jail);
@ -306,7 +308,7 @@ SysResult sys_sigsuspend(Thread *thread, ptr<const struct sigset> set);
SysResult sys_sigpending(Thread *thread, ptr<struct sigset> set);
SysResult sys_sigtimedwait(Thread *thread, ptr<const struct sigset> set,
ptr<struct siginfo> info,
ptr<const struct timespec> timeout);
ptr<const timespec> timeout);
SysResult sys_sigwaitinfo(Thread *thread, ptr<const struct sigset> set,
ptr<struct siginfo> info);
SysResult sys___acl_get_file(Thread *thread, ptr<char> path, acl_type_t type,
@ -336,15 +338,15 @@ SysResult sys_extattr_get_file(Thread *thread, ptr<char> path,
SysResult sys_extattr_delete_file(Thread *thread, ptr<char> path,
sint attrnamespace, ptr<const char> attrname);
SysResult sys_aio_waitcomplete(Thread *thread, ptr<ptr<struct aiocb>> aiocbp,
ptr<struct timespec> timeout);
ptr<timespec> timeout);
SysResult sys_getresuid(Thread *thread, ptr<uid_t> ruid, ptr<uid_t> euid,
ptr<uid_t> suid);
SysResult sys_getresgid(Thread *thread, ptr<gid_t> rgid, ptr<gid_t> egid,
ptr<gid_t> sgid);
SysResult sys_kqueue(Thread *thread);
SysResult sys_kevent(Thread *thread, sint fd, ptr<struct kevent> changelist,
sint nchanges, ptr<struct kevent> eventlist, sint nevents,
ptr<const struct timespec> timeout);
SysResult sys_kevent(Thread *thread, sint fd, ptr<KEvent> changelist,
sint nchanges, ptr<KEvent> eventlist, sint nevents,
ptr<const timespec> timeout);
SysResult sys_extattr_set_fd(Thread *thread, sint fd, sint attrnamespace,
ptr<const char> attrname, ptr<void> data,
size_t nbytes);
@ -443,8 +445,8 @@ SysResult sys_extattr_list_link(Thread *thread, ptr<const char> path,
sint attrnamespace, ptr<void> data,
size_t nbytes);
SysResult sys_ksem_timedwait(Thread *thread, semid_t id,
ptr<const struct timespec> abstime);
SysResult sys_thr_suspend(Thread *thread, ptr<const struct timespec> timeout);
ptr<const timespec> abstime);
SysResult sys_thr_suspend(Thread *thread, ptr<const timespec> timeout);
SysResult sys_thr_wake(Thread *thread, slong id);
SysResult sys_kldunloadf(Thread *thread, slong fileid, sint flags);
SysResult sys_audit(Thread *thread, ptr<const void> record, uint length);
@ -473,10 +475,10 @@ SysResult sys_kmq_setattr(Thread *thread, sint mqd,
SysResult sys_kmq_timedreceive(Thread *thread, sint mqd,
ptr<const char> msg_ptr, size_t msg_len,
ptr<uint> msg_prio,
ptr<const struct timespec> abstimeout);
ptr<const timespec> abstimeout);
SysResult sys_kmq_timedsend(Thread *thread, sint mqd, ptr<char> msg_ptr,
size_t msg_len, ptr<uint> msg_prio,
ptr<const struct timespec> abstimeout);
ptr<const timespec> abstimeout);
SysResult sys_kmq_notify(Thread *thread, sint mqd,
ptr<const struct sigevent> sigev);
SysResult sys_kmq_unlink(Thread *thread, ptr<const char> path);
@ -575,7 +577,7 @@ SysResult sys_pdfork(Thread *thread, ptr<sint> fdp, sint flags);
SysResult sys_pdkill(Thread *thread, sint fd, sint signum);
SysResult sys_pdgetpid(Thread *thread, sint fd, ptr<pid_t> pidp);
SysResult sys_pselect(Thread *thread, sint nd, ptr<fd_set> in, ptr<fd_set> ou,
ptr<fd_set> ex, ptr<const struct timespec> ts,
ptr<fd_set> ex, ptr<const timespec> ts,
ptr<const sigset_t> sm);
SysResult sys_getloginclass(Thread *thread, ptr<char> namebuf, size_t namelen);
SysResult sys_setloginclass(Thread *thread, ptr<char> namebuf);

View file

@ -7,6 +7,7 @@
namespace orbis {
struct Thread;
struct Module;
struct timespec;
struct ProcessOps {
SysResult (*mmap)(Thread *thread, caddr_t addr, size_t len, sint prot,
@ -57,7 +58,7 @@ struct ProcessOps {
SysResult (*thr_exit)(Thread *thread, ptr<slong> state);
SysResult (*thr_kill)(Thread *thread, slong id, sint sig);
SysResult (*thr_kill2)(Thread *thread, pid_t pid, slong id, sint sig);
SysResult (*thr_suspend)(Thread *thread, ptr<const struct timespec> timeout);
SysResult (*thr_suspend)(Thread *thread, ptr<const timespec> timeout);
SysResult (*thr_wake)(Thread *thread, slong id);
SysResult (*thr_set_name)(Thread *thread, slong id, ptr<const char> name);

View file

@ -78,7 +78,7 @@ orbis::SysResult orbis::sys_ioctl(Thread *thread, sint fd, ulong com,
}
orbis::SysResult orbis::sys_pselect(Thread *thread, sint nd, ptr<fd_set> in,
ptr<fd_set> ou, ptr<fd_set> ex,
ptr<const struct timespec> ts,
ptr<const timespec> ts,
ptr<const sigset_t> sm) {
return ErrorCode::NOSYS;
}

View file

@ -30,8 +30,7 @@ orbis::SysResult orbis::sys_sched_get_priority_min(Thread *thread,
sint policy) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_sched_rr_get_interval(Thread *thread, pid_t pid,
ptr<struct timespec> interval) {
orbis::SysResult orbis::sys_sched_rr_get_interval(Thread *thread, pid_t pid,
ptr<timespec> interval) {
return ErrorCode::NOSYS;
}

View file

@ -44,7 +44,7 @@ orbis::SysResult orbis::sys_sigwait(Thread *thread,
orbis::SysResult orbis::sys_sigtimedwait(Thread *thread,
ptr<const struct sigset> set,
ptr<struct siginfo> info,
ptr<const struct timespec> timeout) {
ptr<const timespec> timeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_sigwaitinfo(Thread *thread,

View file

@ -48,7 +48,7 @@ orbis::SysResult orbis::sys_thr_kill2(Thread *thread, pid_t pid, slong id,
}
orbis::SysResult orbis::sys_thr_suspend(Thread *thread,
ptr<const struct timespec> timeout) {
ptr<const timespec> timeout) {
if (auto thr_suspend = thread->tproc->ops->thr_suspend) {
return thr_suspend(thread, timeout);
}

View file

@ -1,4 +1,5 @@
#include "sys/sysproto.hpp"
#include "time.hpp"
#include "utils/Logs.hpp"
#include <ctime>
@ -100,16 +101,15 @@ orbis::SysResult orbis::sys_clock_gettime(Thread *, clockid_t clock_id,
return uwrite(tp, result);
}
orbis::SysResult orbis::sys_clock_settime(Thread *thread, clockid_t clock_id,
ptr<const struct timespec> tp) {
ptr<const timespec> tp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_clock_getres(Thread *thread, clockid_t clock_id,
ptr<struct timespec> tp) {
ptr<timespec> tp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_nanosleep(Thread *thread,
ptr<const struct timespec> rqtp,
ptr<struct timespec> rmtp) {
orbis::SysResult orbis::sys_nanosleep(Thread *thread, ptr<const timespec> rqtp,
ptr<timespec> rmtp) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_gettimeofday(Thread *thread, ptr<struct timeval> tp,

View file

@ -13,16 +13,16 @@ orbis::SysResult orbis::sys_kmq_setattr(Thread *thread, sint mqd,
ptr<struct mq_attr> oattr) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_kmq_timedreceive(Thread *thread, sint mqd, ptr<const char> msg_ptr,
size_t msg_len, ptr<uint> msg_prio,
ptr<const struct timespec> abstimeout) {
orbis::SysResult orbis::sys_kmq_timedreceive(Thread *thread, sint mqd,
ptr<const char> msg_ptr,
size_t msg_len, ptr<uint> msg_prio,
ptr<const timespec> abstimeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult
orbis::sys_kmq_timedsend(Thread *thread, sint mqd, ptr<char> msg_ptr,
size_t msg_len, ptr<uint> msg_prio,
ptr<const struct timespec> abstimeout) {
orbis::SysResult orbis::sys_kmq_timedsend(Thread *thread, sint mqd,
ptr<char> msg_ptr, size_t msg_len,
ptr<uint> msg_prio,
ptr<const timespec> abstimeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_kmq_notify(Thread *thread, sint mqd,

View file

@ -22,7 +22,7 @@ orbis::SysResult orbis::sys_ksem_wait(Thread *thread, semid_t id) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_timedwait(Thread *thread, semid_t id,
ptr<const struct timespec> abstime) {
ptr<const timespec> abstime) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_ksem_trywait(Thread *thread, semid_t id) {

View file

@ -6,7 +6,7 @@ orbis::SysResult orbis::sys_aio_return(Thread *thread,
}
orbis::SysResult orbis::sys_aio_suspend(Thread *thread,
ptr<struct aiocb> aiocbp, sint nent,
ptr<const struct timespec> timeout) {
ptr<const timespec> timeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_cancel(Thread *thread, sint fd,
@ -44,7 +44,7 @@ orbis::SysResult orbis::sys_lio_listio(Thread *thread, sint mode,
}
orbis::SysResult orbis::sys_aio_waitcomplete(Thread *thread,
ptr<ptr<struct aiocb>> aiocbp,
ptr<struct timespec> timeout) {
ptr<timespec> timeout) {
return ErrorCode::NOSYS;
}
orbis::SysResult orbis::sys_aio_fsync(Thread *thread, sint op,

View file

@ -135,7 +135,7 @@ orbis::SysResult close(orbis::Thread *thread, orbis::sint fd) {
#define IOC_DIRMASK (IOC_VOID | IOC_OUT | IOC_IN)
#define _IOC(inout, group, num, len) \
((unsigned long)((inout) | (((len)&IOCPARM_MASK) << 16) | ((group) << 8) | \
((unsigned long)((inout) | (((len) & IOCPARM_MASK) << 16) | ((group) << 8) | \
(num)))
#define _IO(g, n) _IOC(IOC_VOID, (g), (n), 0)
#define _IOWINT(g, n) _IOC(IOC_VOID, (g), (n), sizeof(int))
@ -498,7 +498,7 @@ SysResult thr_kill2(orbis::Thread *thread, orbis::pid_t pid, orbis::slong id,
return ErrorCode::NOTSUP;
}
SysResult thr_suspend(orbis::Thread *thread,
orbis::ptr<const timespec> timeout) {
orbis::ptr<const orbis::timespec> timeout) {
return ErrorCode::NOTSUP;
}
SysResult thr_wake(orbis::Thread *thread, orbis::slong id) {