[sheepdog] [PATCH] sheepdog proto: avoid using stdint.h macros, so sbd can build.

Alexander Guy alexander at andern.org
Mon Jan 19 21:39:44 CET 2015


The Linux kernel headers don't have the *_C suffix macros, so
they can't be used in a header file shared between sheepdog userspace
and the sbd kernel module.

Signed-off-by: Alexander Guy <alexander at andern.org>
---
 include/sheepdog_proto.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h
index 3910bd5..0599ece 100644
--- a/include/sheepdog_proto.h
+++ b/include/sheepdog_proto.h
@@ -493,7 +493,7 @@ static inline bool is_data_obj(uint64_t oid)
 static inline size_t count_data_objs(const struct sd_inode *inode)
 {
 	return DIV_ROUND_UP(inode->vdi_size,
-			    (UINT32_C(1) << inode->block_size_shift));
+			    (1UL << inode->block_size_shift));
 }
 
 static inline size_t get_objsize(uint64_t oid, uint32_t object_size)
-- 
2.1.4




More information about the sheepdog mailing list