git: 04f683b25a81 - main - subr_unit.c: another attempt to fix the build

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Fri, 18 Aug 2023 16:28:48 UTC
The branch main has been updated by kib:

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

commit 04f683b25a81ad47c998e3e496419c08ae4905eb
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-08-18 15:42:59 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-08-18 16:28:42 +0000

    subr_unit.c: another attempt to fix the build
    
    Reported by:    cy
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/kern/subr_unit.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c
index 7a23f216d98e..6826678104d6 100644
--- a/sys/kern/subr_unit.c
+++ b/sys/kern/subr_unit.c
@@ -340,6 +340,10 @@ free_iter_unr(void *handle)
 }
 
 #if defined(DIAGNOSTIC) || !defined(_KERNEL)
+#ifndef __diagused
+#define	__diagused
+#endif
+
 /*
  * Consistency check function.
  *