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
This commit is contained in:
parent
7d3df83cfa
commit
a7f67facdf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343928
@ -106,6 +106,9 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/elf.h>
|
||||
#ifdef __amd64__
|
||||
#include <machine/md_var.h>
|
||||
#endif
|
||||
|
||||
#include <security/audit/audit.h>
|
||||
|
||||
|
@ -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;
|
||||
|
@ -74,6 +74,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/syscallsubr.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/vmmeter.h>
|
||||
#if defined(__amd64__) || defined(__i386__) /* for i386_read_exec */
|
||||
#include <machine/md_var.h>
|
||||
#endif
|
||||
|
||||
#include <security/audit/audit.h>
|
||||
#include <security/mac/mac_framework.h>
|
||||
|
@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <sys/systm.h>
|
||||
#if defined(__amd64__) || defined(__i386__) /* for i386_read_exec */
|
||||
#include <machine/md_var.h>
|
||||
#endif
|
||||
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_param.h>
|
||||
|
Loading…
Reference in New Issue
Block a user