From b2f1a8f2b3de6e14de48ee77fee760ffc04bc08d Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 30 Oct 2011 02:19:39 +0000 Subject: [PATCH] Revert rev. 226893: subr_syscall.c is being included from C files and on amd64 with FREEBSD32 enabled, this means that systrace_probe_func gets defined twice. --- sys/amd64/amd64/trap.c | 7 +++++++ sys/i386/i386/trap.c | 7 +++++++ sys/kern/subr_syscall.c | 9 --------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 29987da31a6a..9c72a693a0a4 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -103,6 +103,13 @@ dtrace_trap_func_t dtrace_trap_func; dtrace_doubletrap_func_t dtrace_doubletrap_func; +/* + * This is a hook which is initialised by the systrace module + * when it is loaded. This keeps the DTrace syscall provider + * implementation opaque. + */ +systrace_probe_func_t systrace_probe_func; + /* * These hooks are necessary for the pid, usdt and fasttrap providers. */ diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index c19846bd6baf..5006f41be1ec 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -112,6 +112,13 @@ dtrace_trap_func_t dtrace_trap_func; dtrace_doubletrap_func_t dtrace_doubletrap_func; +/* + * This is a hook which is initialised by the systrace module + * when it is loaded. This keeps the DTrace syscall provider + * implementation opaque. + */ +systrace_probe_func_t systrace_probe_func; + /* * These hooks are necessary for the pid, usdt and fasttrap providers. */ diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index f9689a0bf91b..bba44794cefb 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -52,15 +52,6 @@ __FBSDID("$FreeBSD$"); #endif #include -#ifdef KDTRACE_HOOKS -/* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; -#endif - static inline int syscallenter(struct thread *td, struct syscall_args *sa) {