amd64: -m32 support for machine/counter.h

Install the i386 counter.h under /usr/include/i386 on amd64 and include
when targeting i386.

This is a kernel-only header required by procstat's ZFS support.

Reviewed by:	jhb, imp
This commit is contained in:
Brooks Davis 2022-06-13 18:35:40 +01:00
parent 9f7588dd93
commit 8dc3fdfe69
2 changed files with 7 additions and 0 deletions

View File

@ -14,6 +14,7 @@ INCS= \
# These kernel-only headers are used by procstat's ZFS support.
# This should be fixed.
INCS+= \
counter.h \
pcpu.h \
pcpu_aux.h
INCSDIR= ${INCLUDEDIR}/i386

View File

@ -28,6 +28,10 @@
* $FreeBSD$
*/
#ifdef __i386__
#include <i386/counter.h>
#else /* !__i386__ */
#ifndef __MACHINE_COUNTER_H__
#define __MACHINE_COUNTER_H__
@ -90,3 +94,5 @@ counter_u64_add(counter_u64_t c, int64_t inc)
}
#endif /* ! __MACHINE_COUNTER_H__ */
#endif /* __i386__ */