From owner-svn-src-all@freebsd.org Sat Feb 9 03:51:53 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5249814D52A4; Sat, 9 Feb 2019 03:51:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB67882B17; Sat, 9 Feb 2019 03:51:52 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BC8742311F; Sat, 9 Feb 2019 03:51:52 +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 x193pq5V047586; Sat, 9 Feb 2019 03:51:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x193pqIn047583; Sat, 9 Feb 2019 03:51:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201902090351.x193pqIn047583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 9 Feb 2019 03:51:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343928 - in head/sys: compat/freebsd32 sys vm X-SVN-Group: head X-SVN-Commit-Author: kib X-SVN-Commit-Paths: in head/sys: compat/freebsd32 sys vm X-SVN-Commit-Revision: 343928 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: EB67882B17 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Sat, 09 Feb 2019 03:51:53 -0000 Author: kib Date: Sat Feb 9 03:51:51 2019 New Revision: 343928 URL: https://svnweb.freebsd.org/changeset/base/343928 Log: Normalize the declaration of i386_read_exec variable. It is currently re-declared in sys/sysent.h which is a wrong place for MD variable. Which causes redeclaration error with gcc when sys/sysent.h and machine/md_var.h are included both. Remove it from sys/sysent.h and instead include machine/md_var.h when needed, under #ifdef for both i386 and amd64. Reported and tested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c head/sys/sys/sysent.h head/sys/vm/vm_mmap.c head/sys/vm/vm_unix.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sat Feb 9 03:00:00 2019 (r343927) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sat Feb 9 03:51:51 2019 (r343928) @@ -106,6 +106,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef __amd64__ +#include +#endif #include Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Sat Feb 9 03:00:00 2019 (r343927) +++ head/sys/sys/sysent.h Sat Feb 9 03:51:51 2019 (r343928) @@ -163,10 +163,6 @@ extern struct sysentvec aout_sysvec; extern struct sysent sysent[]; extern const char *syscallnames[]; -#if defined(__amd64__) -extern int i386_read_exec; -#endif - #define NO_SYSCALL (-1) struct module; Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Sat Feb 9 03:00:00 2019 (r343927) +++ head/sys/vm/vm_mmap.c Sat Feb 9 03:51:51 2019 (r343928) @@ -74,6 +74,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(__amd64__) || defined(__i386__) /* for i386_read_exec */ +#include +#endif #include #include Modified: head/sys/vm/vm_unix.c ============================================================================== --- head/sys/vm/vm_unix.c Sat Feb 9 03:00:00 2019 (r343927) +++ head/sys/vm/vm_unix.c Sat Feb 9 03:51:51 2019 (r343928) @@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(__amd64__) || defined(__i386__) /* for i386_read_exec */ +#include +#endif #include #include