diff --git a/src/kernel/emulation/linux/CMakeLists.txt b/src/kernel/emulation/linux/CMakeLists.txt index ee10ae2f2..8c0fc5f15 100644 --- a/src/kernel/emulation/linux/CMakeLists.txt +++ b/src/kernel/emulation/linux/CMakeLists.txt @@ -43,6 +43,7 @@ set(emulation_sources mman/msync.c kqueue/kqueue.c kqueue/kevent.c + kqueue/kevent64.c unistd/getsid.c unistd/fsync.c unistd/sync.c diff --git a/src/kernel/emulation/linux/kqueue/kevent64.c b/src/kernel/emulation/linux/kqueue/kevent64.c new file mode 100644 index 000000000..7ff9183e1 --- /dev/null +++ b/src/kernel/emulation/linux/kqueue/kevent64.c @@ -0,0 +1,16 @@ +#include "kevent.h" +#include "../base.h" +#include "../errno.h" +#include +#include +#include "../../../../../platform-include/sys/errno.h" + +int __attribute__((weak)) __attribute__((visibility("default"))) kevent64_impl(int kq, ...) { return -ENOSYS; } + +long sys_kevent64(int kq, const struct kevent64 *changelist, int nchanges, + struct kevent64 *eventlist, int nevents, unsigned int flags, + const struct timespec *timeout); +{ + return kevent64_impl(kq, changelist, nchanges, eventlist, nevents, flags, timeout); +} + diff --git a/src/kernel/emulation/linux/kqueue/kevent64.h b/src/kernel/emulation/linux/kqueue/kevent64.h new file mode 100644 index 000000000..5e425c47c --- /dev/null +++ b/src/kernel/emulation/linux/kqueue/kevent64.h @@ -0,0 +1,12 @@ +#ifndef LINUX_KEVENT64_H +#define LINUX_KEVENT64_H + +struct kevent64; +struct timespec; + +long sys_kevent64(int kq, const struct kevent64 *changelist, int nchanges, + struct kevent64 *eventlist, int nevents, unsigned int flags, + const struct timespec *timeout); + +#endif + diff --git a/src/kernel/emulation/linux/syscalls.c b/src/kernel/emulation/linux/syscalls.c index 2121c559f..c3441b209 100644 --- a/src/kernel/emulation/linux/syscalls.c +++ b/src/kernel/emulation/linux/syscalls.c @@ -2,6 +2,7 @@ #include "kqueue/kqueue.h" #include "kqueue/kevent.h" +#include "kqueue/kevent64.h" #include "unistd/write.h" #include "unistd/read.h" #include "guarded/guarded_open_np.h" @@ -339,6 +340,7 @@ void* __bsd_syscall_table[600] = { [366] = sys_bsdthread_register, [367] = sys_workq_open, [368] = sys_workq_kernreturn, + [369] = sys_kevent64, [372] = sys_thread_selfid, [394] = sys_pselect, [395] = sys_pselect_nocancel,