I tried to compile the example but I got this error: syscall.c:55:2: error: incompatible function pointer types initializing 'systrace_args_func_t' (aka 'void (*)(int, void *, unsigned long *, int *)') with an expression of type 'int (struct thread *, void *)' [-Werror,-Wincompatible-function-pointer-types] hello /* sy_call */ ^~~~~ 1 error generated. *** Error code 1 the 'struct sysent' is different in FreeBSD 13 STABLE
(In reply to Scotty from comment #0) Hi Scotty, Where is this example? Is it in a man page? In out website? Thanks!
(In reply to Fernando Apesteguía from comment #1) I guess it's about share/examples/kld/syscall/module/syscall.c in the src tree.
yeah my bad, it's in man(9) SYSCALL_MODULE
https://reviews.freebsd.org/D30498
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=dc318a4ffabcbfa23bb56a33403aad36e6de30af commit dc318a4ffabcbfa23bb56a33403aad36e6de30af Author: Fernando ApesteguÃa <fernape@FreeBSD.org> AuthorDate: 2021-05-27 12:09:39 +0000 Commit: Fernando ApesteguÃa <fernape@FreeBSD.org> CommitDate: 2021-06-09 10:24:26 +0000 Fix syscall kld example PR: 255936 Reported by: splitface@mailfence.com Approved by: gbe (mentor), imp@, jilles@ Differential Revision: https://reviews.freebsd.org/D30498 share/examples/kld/syscall/module/syscall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Committed, Thanks!