From 5ea3094e6a755b931d144f30a824e2fed10a8a33 Mon Sep 17 00:00:00 2001 From: Brooks Davis Date: Mon, 13 Jun 2022 18:35:40 +0100 Subject: [PATCH] amd64: -m32 support for machine/md_var.h Install the i386 md_var.h under /usr/include/i386 on amd64 and include when targeting i386. This is a mostly kernel-only header required by procstat's ZFS support. It is pulled in by the i386 machine/counter.h. Reviewed by: jhb, imp --- include/i386/Makefile | 1 + sys/amd64/include/md_var.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/include/i386/Makefile b/include/i386/Makefile index 58c619f4dbd..b5f5a23eb90 100644 --- a/include/i386/Makefile +++ b/include/i386/Makefile @@ -15,6 +15,7 @@ INCS= \ # This should be fixed. INCS+= \ counter.h \ + md_var.h \ pcpu.h \ pcpu_aux.h INCSDIR= ${INCLUDEDIR}/i386 diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h index 53358600dc7..196836b5bae 100644 --- a/sys/amd64/include/md_var.h +++ b/sys/amd64/include/md_var.h @@ -31,6 +31,10 @@ * $FreeBSD$ */ +#ifdef __i386__ +#include +#else /* !__i386__ */ + #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ @@ -95,3 +99,5 @@ int set_fpcontext(struct thread *td, struct __mcontext *mcp, char *xfpustate, size_t xfpustate_len); #endif /* !_MACHINE_MD_VAR_H_ */ + +#endif /* __i386__ */