diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index d824b401d971..a0415f3a4cca 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -76,6 +76,7 @@ __FBSDID("$FreeBSD$"); #include <amd64/linux32/linux.h> #include <amd64/linux32/linux32_proto.h> +#include <compat/linux/linux_futex.h> #include <compat/linux/linux_emul.h> #include <compat/linux/linux_mib.h> #include <compat/linux/linux_misc.h> @@ -127,9 +128,6 @@ static void exec_linux_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings); static void linux32_fixlimit(struct rlimit *rl, int which); -extern LIST_HEAD(futex_list, futex) futex_list; -extern struct mtx futex_mtx; - static eventhandler_tag linux_exit_tag; static eventhandler_tag linux_schedtail_tag; static eventhandler_tag linux_exec_tag; diff --git a/sys/compat/linux/linux_futex.c b/sys/compat/linux/linux_futex.c index e7320276d9a3..3024dc497902 100644 --- a/sys/compat/linux/linux_futex.c +++ b/sys/compat/linux/linux_futex.c @@ -81,7 +81,7 @@ struct futex { TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc; }; -LIST_HEAD(futex_list, futex) futex_list; +struct futex_list futex_list; #define FUTEX_LOCK(f) sx_xlock(&(f)->f_lck) #define FUTEX_UNLOCK(f) sx_xunlock(&(f)->f_lck) diff --git a/sys/compat/linux/linux_futex.h b/sys/compat/linux/linux_futex.h index ca8b76814d57..1d462a74816c 100644 --- a/sys/compat/linux/linux_futex.h +++ b/sys/compat/linux/linux_futex.h @@ -36,6 +36,9 @@ #ifndef _LINUX_FUTEX_H #define _LINUX_FUTEX_H +extern LIST_HEAD(futex_list, futex) futex_list; +extern struct mtx futex_mtx; + #define LINUX_FUTEX_WAIT 0 #define LINUX_FUTEX_WAKE 1 #define LINUX_FUTEX_FD 2 /* unused */ diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 538710f6d776..7e64fa8d0653 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include <i386/linux/linux.h> #include <i386/linux/linux_proto.h> +#include <compat/linux/linux_futex.h> #include <compat/linux/linux_emul.h> #include <compat/linux/linux_mib.h> #include <compat/linux/linux_misc.h> @@ -111,9 +112,6 @@ static register_t *linux_copyout_strings(struct image_params *imgp); static int linux_szplatform; const char *linux_platform; -extern LIST_HEAD(futex_list, futex) futex_list; -extern struct mtx futex_mtx; - static eventhandler_tag linux_exit_tag; static eventhandler_tag linux_schedtail_tag; static eventhandler_tag linux_exec_tag;