Author: markj Date: Fri Feb 28 17:05:04 2020 New Revision: 358434 URL: https://svnweb.freebsd.org/changeset/base/358434
Log: Fix standalone builds of systrace.ko after r357912. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/subr_syscall.c head/sys/sys/sysent.h Modified: head/sys/kern/subr_syscall.c ============================================================================== --- head/sys/kern/subr_syscall.c Fri Feb 28 17:04:36 2020 (r358433) +++ head/sys/kern/subr_syscall.c Fri Feb 28 17:05:04 2020 (r358434) @@ -141,7 +141,8 @@ syscallenter(struct thread *td) /* Let system calls set td_errno directly. */ td->td_pflags &= ~TDP_NERRNO; - if (__predict_false(systrace_enabled || AUDIT_SYSCALL_ENTER(sa->code, td))) { + if (__predict_false(SYSTRACE_ENABLED() || + AUDIT_SYSCALL_ENTER(sa->code, td))) { #ifdef KDTRACE_HOOKS /* Give the syscall:::entry DTrace probe a chance to fire. */ if (__predict_false(sa->callp->sy_entry != 0)) Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Fri Feb 28 17:04:36 2020 (r358433) +++ head/sys/sys/sysent.h Fri Feb 28 17:05:04 2020 (r358434) @@ -42,6 +42,7 @@ struct thread; struct ksiginfo; struct syscall_args; +#ifdef _KERNEL enum systrace_probe_t { SYSTRACE_ENTRY, SYSTRACE_RETURN, @@ -53,14 +54,15 @@ typedef void (*systrace_probe_func_t)(struct syscall_a enum systrace_probe_t, int); typedef void (*systrace_args_func_t)(int, void *, uint64_t *, int *); -#ifdef _KERNEL -#ifdef KDTRACE_HOOKS +extern systrace_probe_func_t systrace_probe_func; extern bool systrace_enabled; + +#ifdef KDTRACE_HOOKS +#define SYSTRACE_ENABLED() (systrace_enabled) #else -#define systrace_enabled 0 +#define SYSTRACE_ENABLED() (0) #endif -#endif -extern systrace_probe_func_t systrace_probe_func; +#endif /* _KERNEL */ struct sysent { /* system call table */ int sy_narg; /* number of arguments */ _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"