git: 2e1226c3b2aa - stable/15 - libnetbsd: Avoid bringing in all of sys/param.h in sys/types.h

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Wed, 08 Jul 2026 18:09:58 UTC
The branch stable/15 has been updated by markj:

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

commit 2e1226c3b2aa5960374fe8cf4aa150ebc1a5b3e2
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-06-24 13:16:45 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-07-08 18:09:35 +0000

    libnetbsd: Avoid bringing in all of sys/param.h in sys/types.h
    
    It's okay to hard-code NBBY, as the value is somewhat unlikely to
    change.
    
    The pollution from sys/param.h makes it harder to import test code from
    NetBSD since it can introduce conflicting definitions, e.g.,
    MIN()/MAX().
    
    Reviewed by:    ngie
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D57754
    
    (cherry picked from commit 0976744085bcd7ebda9779b02d78a85254b3e352)
---
 lib/libnetbsd/sys/types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libnetbsd/sys/types.h b/lib/libnetbsd/sys/types.h
index 97040b5cdec2..5176371d898f 100644
--- a/lib/libnetbsd/sys/types.h
+++ b/lib/libnetbsd/sys/types.h
@@ -31,6 +31,6 @@
 
 #include_next <sys/types.h>
 
-#include <sys/param.h>	/* For NBBY */
+#define	NBBY	8
 
 #endif