common/types.h: explicitly define NBBY (bits per byte)

This avoids a compilation failure with musl libc, which requires an
explicit <sys/param.h> include to expose NBBY. Inline the declaration
since common/types.h is included in many places, and only one constant
from <sys/param.h> is needed.

Signed-off-by: Felix Janda <>
Reviewed-by: Eric Sandeen <>
[sandeen: guard with #ifndef to be sure]
Signed-off-by: Eric Sandeen <>

1 file changed