git: 5ea3094e6a75 - main - amd64: -m32 support for machine/md_var.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Jun 2022 17:36:13 UTC
The branch main has been updated by brooks:
URL: https://cgit.FreeBSD.org/src/commit/?id=5ea3094e6a755b931d144f30a824e2fed10a8a33
commit 5ea3094e6a755b931d144f30a824e2fed10a8a33
Author: Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-06-13 17:35:40 +0000
Commit: Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-06-13 17:35:40 +0000
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 58c619f4dbdf..b5f5a23eb906 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 53358600dc79..196836b5baea 100644
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -31,6 +31,10 @@
* $FreeBSD$
*/
+#ifdef __i386__
+#include <i386/md_var.h>
+#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__ */