Date: Fri, 23 Oct 2015 11:41:55 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289822 - head/sys/compat/linux Message-ID: <201510231141.t9NBftVi049340@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Oct 23 11:41:55 2015 New Revision: 289822 URL: https://svnweb.freebsd.org/changeset/base/289822 Log: Fix build for the KTR-enabled kernels. Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_misc.c Modified: head/sys/compat/linux/linux_misc.c ============================================================================== --- head/sys/compat/linux/linux_misc.c Fri Oct 23 11:00:35 2015 (r289821) +++ head/sys/compat/linux/linux_misc.c Fri Oct 23 11:41:55 2015 (r289822) @@ -2356,7 +2356,13 @@ linux_ppoll(struct thread *td, struct li #if defined(DEBUG) || defined(KTR) /* XXX: can be removed when every ldebug(...) and KTR stuff are removed. */ -u_char linux_debug_map[howmany(LINUX_SYS_MAXSYSCALL, sizeof(u_char))]; +#ifdef COMPAT_LINUX32 +#define L_MAXSYSCALL LINUX32_SYS_MAXSYSCALL +#else +#define L_MAXSYSCALL LINUX_SYS_MAXSYSCALL +#endif + +u_char linux_debug_map[howmany(L_MAXSYSCALL, sizeof(u_char))]; static int linux_debug(int syscall, int toggle, int global) @@ -2368,7 +2374,7 @@ linux_debug(int syscall, int toggle, int memset(linux_debug_map, c, sizeof(linux_debug_map)); return (0); } - if (syscall < 0 || syscall >= LINUX_SYS_MAXSYSCALL) + if (syscall < 0 || syscall >= L_MAXSYSCALL) return (EINVAL); if (toggle) clrbit(linux_debug_map, syscall); @@ -2376,6 +2382,7 @@ linux_debug(int syscall, int toggle, int setbit(linux_debug_map, syscall); return (0); } +#undef L_MAXSYSCALL /* * Usage: sysctl linux.debug=<syscall_nr>.<0/1>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510231141.t9NBftVi049340>