Skip to content

Commit

Permalink
libc: add dummy implementations for kqueue/kevent
Browse files Browse the repository at this point in the history
  • Loading branch information
rite committed Mar 7, 2024
1 parent 36a52c6 commit 0219d05
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions repos/libports/lib/symbols/libc
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ iswupper T
iswxdigit T
isxdigit T
jrand48 T
kevent T
kqueue T
kill W
killpg T
ksem_init T
Expand Down
12 changes: 12 additions & 0 deletions repos/libports/src/lib/compat-libc/compat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,19 @@ extern "C" int freebsd11_readdir_r(DIR *dirp,
}


extern "C" int freebsd11_kevent(int,
const struct kevent*,
int,
struct kevent *,
int,
const struct timespec*)
{
return 0;
}


__sym_compat(fstat, freebsd11_fstat, FBSD_1.0);
__sym_compat(stat, freebsd11_stat, FBSD_1.0);
__sym_compat(lstat, freebsd11_lstat, FBSD_1.0);
__sym_compat(readdir_r, freebsd11_readdir_r, FBSD_1.0);
__sym_compat(kevent, freebsd11_kevent, FBSD_1.0);
1 change: 1 addition & 0 deletions repos/libports/src/lib/libc/dummies.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ DUMMY(int , -1, _umtx_op, (void *, int , u_long, void *, void *))
__SYS_DUMMY(int, -1, aio_suspend, (const struct aiocb * const[], int, const struct timespec *));
__SYS_DUMMY(int , -1, getfsstat, (struct statfs *, long, int))
__SYS_DUMMY(int, -1, kevent, (int, const struct kevent*, int, struct kevent *, int, const struct timespec*));
__SYS_DUMMY(int, -1, kqueue, (void));
__SYS_DUMMY(void , , map_stacks_exec, (void));
__SYS_DUMMY(int , -1, ptrace, (int, pid_t, caddr_t, int));
__SYS_DUMMY(ssize_t, -1, sendmsg, (int s, const struct msghdr*, int));
Expand Down

0 comments on commit 0219d05

Please sign in to comment.