git: 096b8244dad4 - stable/15 - vm: Make sure NULL is defined for vm_memattr_name()

Mark Johnston <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src,gmane.os.freebsd.devel.stable.scm
Message-ID <[email protected]>
The branch stable/15 has been updated by markj:

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

commit 096b8244dad4b1af6665fc22a2065a1df2ea5fa1
Author:     Mark Johnston <[email protected]>
AuthorDate: 2026-07-19 14:09:27 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2026-08-06 13:24:43 +0000

    vm: Make sure NULL is defined for vm_memattr_name()
    
    Fixes:  a7e483ee146a ("vm_phys: Add a sysctl to dump registered fictitious memory ranges")
    (cherry picked from commit 11edc985cd9c2e1dcceccb7e929c6921b4e20c9b)
---
 sys/amd64/include/vm.h   | 2 ++
 sys/arm/include/vm.h     | 2 ++
 sys/arm64/include/vm.h   | 2 ++
 sys/i386/include/vm.h    | 2 ++
 sys/powerpc/include/vm.h | 2 ++
 sys/riscv/include/vm.h   | 2 ++
 6 files changed, 12 insertions(+)

diff --git a/sys/amd64/include/vm.h b/sys/amd64/include/vm.h
index 7219f8650a9f..60ed1d98daa2 100644
--- a/sys/amd64/include/vm.h
+++ b/sys/amd64/include/vm.h
@@ -44,6 +44,8 @@
 #define	VM_MEMATTR_DEVICE		VM_MEMATTR_UNCACHEABLE
 
 #ifdef _KERNEL
+#include <sys/_null.h>
+
 static inline const char *
 vm_memattr_name(vm_memattr_t memattr)
 {
diff --git a/sys/arm/include/vm.h b/sys/arm/include/vm.h
index 373f51adec82..867418cc7a06 100644
--- a/sys/arm/include/vm.h
+++ b/sys/arm/include/vm.h
@@ -42,6 +42,8 @@
 #define VM_MEMATTR_WRITE_COMBINING 	VM_MEMATTR_WRITE_THROUGH /* for DRM */
 #define VM_MEMATTR_WRITE_BACK		VM_MEMATTR_WB_WA	/* for DRM */
 
+#include <sys/_null.h>
+
 static inline const char *
 vm_memattr_name(vm_memattr_t memattr)
 {
diff --git a/sys/arm64/include/vm.h b/sys/arm64/include/vm.h
index 5ceaa9622aec..c9cef5ba1f2e 100644
--- a/sys/arm64/include/vm.h
+++ b/sys/arm64/include/vm.h
@@ -45,6 +45,8 @@
 #define	VM_MEMATTR_WRITE_COMBINING	VM_MEMATTR_WRITE_THROUGH
 
 #ifndef LOCORE
+#include <sys/_null.h>
+
 static inline const char *
 vm_memattr_name(vm_memattr_t memattr)
 {
diff --git a/sys/i386/include/vm.h b/sys/i386/include/vm.h
index 7219f8650a9f..60ed1d98daa2 100644
--- a/sys/i386/include/vm.h
+++ b/sys/i386/include/vm.h
@@ -44,6 +44,8 @@
 #define	VM_MEMATTR_DEVICE		VM_MEMATTR_UNCACHEABLE
 
 #ifdef _KERNEL
+#include <sys/_null.h>
+
 static inline const char *
 vm_memattr_name(vm_memattr_t memattr)
 {
diff --git a/sys/powerpc/include/vm.h b/sys/powerpc/include/vm.h
index 87d0faf44f2e..5374b076a086 100644
--- a/sys/powerpc/include/vm.h
+++ b/sys/powerpc/include/vm.h
@@ -43,6 +43,8 @@
 #define	VM_MEMATTR_DEVICE		VM_MEMATTR_DEFAULT
 
 #ifdef _KERNEL
+#include <sys/_null.h>
+
 static inline const char *
 vm_memattr_name(vm_memattr_t memattr)
 {
diff --git a/sys/riscv/include/vm.h b/sys/riscv/include/vm.h
index 66211fcc2580..60ba1b257bc4 100644
--- a/sys/riscv/include/vm.h
+++ b/sys/riscv/include/vm.h
@@ -39,6 +39,8 @@
 #define	VM_MEMATTR_TOTAL	(VM_MEMATTR_LAST + 1)
 
 #ifdef _KERNEL
+#include <sys/_null.h>
+
 static inline const char *
 vm_memattr_name(vm_memattr_t memattr)
 {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.