git: e0cab5cdb34e - main - subr_physmem: Fix userspace build

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 25 Oct 2022 16:57:42 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=e0cab5cdb34e0ba461ab074804dac59b3f0dc798

commit e0cab5cdb34e0ba461ab074804dac59b3f0dc798
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-10-25 05:05:07 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-10-25 16:57:29 +0000

    subr_physmem: Fix userspace build
    
    Include stdbool.h in userspace configurations. For the kernel builds we
    get it from sys/types.h, but bool isn't defined there for non-kernel
    builds and this otherwise kernel-only file is used for the physmem test
    suite.
    
    Fixes:                  deb1e3b71998
    Sponsored by:           Netflix
---
 sys/sys/physmem.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/sys/physmem.h b/sys/sys/physmem.h
index dcf12b589d05..8ef75c47c1ce 100644
--- a/sys/sys/physmem.h
+++ b/sys/sys/physmem.h
@@ -31,6 +31,10 @@
 #ifndef	_SYS_PHYSMEM_H_
 #define	_SYS_PHYSMEM_H_
 
+#ifndef _KERNEL
+#include <stdbool.h>
+#endif
+
 /*
  * Routines to help configure physical ram.
  *