From owner-svn-src-all@freebsd.org Fri Oct 23 11:41:56 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB5BEA1CA55; Fri, 23 Oct 2015 11:41:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7898EB11; Fri, 23 Oct 2015 11:41:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NBfttV049341; Fri, 23 Oct 2015 11:41:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NBftVi049340; Fri, 23 Oct 2015 11:41:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201510231141.t9NBftVi049340@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Oct 2015 11:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289822 - head/sys/compat/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2015 11:41:56 -0000 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=.<0/1>