Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Jun 2026 14:14:35 +0000
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 0976744085bc - main - libnetbsd: Avoid bringing in all of sys/param.h in sys/types.h
Message-ID:  <6a3be64b.3fece.28304610@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by markj:

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

commit 0976744085bcd7ebda9779b02d78a85254b3e352
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-06-24 13:16:45 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-06-24 14:14:25 +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
---
 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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3be64b.3fece.28304610>