Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133013947
D6848.id17591.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
954 B
Referenced Files
None
Subscribers
None
D6848.id17591.diff
View Options
Index: include/bitstring.h
===================================================================
--- include/bitstring.h
+++ include/bitstring.h
@@ -31,6 +31,7 @@
#include <stdlib.h>
#include <strings.h>
+#include <sys/param.h>
#include <sys/bitstring.h>
#endif /* _BITSTRING_H_ */
Index: sys/sys/bitstring.h
===================================================================
--- sys/sys/bitstring.h
+++ sys/sys/bitstring.h
@@ -65,6 +65,7 @@
#ifdef _KERNEL
#include <sys/libkern.h>
#include <sys/malloc.h>
+#include <sys/param.h>
#endif
#include <sys/types.h>
@@ -105,8 +106,7 @@
/*----------------------------- Public Interface -----------------------------*/
/* Number of bytes consumed by a bit string of nbits bits */
-#define bitstr_size(_nbits) \
- (((_nbits) + _BITSTR_BITS - 1) / 8)
+#define bitstr_size(_nbits) (roundup2((_nbits), _BITSTR_BITS) / 8)
/* Allocate a bit string initialized with no bits set. */
#ifdef _KERNEL
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 23, 1:59 AM (11 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24036731
Default Alt Text
D6848.id17591.diff (954 B)
Attached To
Mode
D6848: Fix bitstring allocation on 32-bit platforms
Attached
Detach File
Event Timeline
Log In to Comment