diff options
Diffstat (limited to 'src/include/buffer.h')
-rw-r--r-- | src/include/buffer.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/include/buffer.h b/src/include/buffer.h index 077cf0d9b0b..ffa3d6e1b97 100644 --- a/src/include/buffer.h +++ b/src/include/buffer.h @@ -14,8 +14,6 @@ #ifndef CEPH_BUFFER_H #define CEPH_BUFFER_H -#include "include/int_types.h" - #if defined(__linux__) #include <stdlib.h> #include <linux/types.h> @@ -46,6 +44,7 @@ void *valloc(size_t); #include <malloc.h> #endif +#include <inttypes.h> #include <stdint.h> #include <string.h> @@ -420,15 +419,7 @@ public: ssize_t read_fd(int fd, size_t len); int write_file(const char *fn, int mode=0644); int write_fd(int fd) const; - __u32 crc32c(__u32 crc) { - for (std::list<ptr>::const_iterator it = _buffers.begin(); - it != _buffers.end(); - ++it) - if (it->length()) - crc = ceph_crc32c(crc, (unsigned char*)it->c_str(), it->length()); - return crc; - } - + uint32_t crc32c(uint32_t crc) const; }; /* @@ -436,7 +427,7 @@ public: */ class hash { - __u32 crc; + uint32_t crc; public: hash() : crc(0) { } @@ -445,7 +436,7 @@ public: crc = bl.crc32c(crc); } - __u32 digest() { + uint32_t digest() { return crc; } }; |