summaryrefslogtreecommitdiffstats
path: root/src/shared/crc32.h
diff options
context:
space:
mode:
authorSimon Rettberg2017-10-24 14:19:53 +0200
committerSimon Rettberg2017-10-24 14:19:53 +0200
commit3bf0f5cfbe96b8aa8681f8fb26868188b52ec8e8 (patch)
tree73ff80a5925105f85e7f28353ba1421ed22848f0 /src/shared/crc32.h
parent[SERVER] Fix types or add explicit casts everywhere we might have type conver... (diff)
downloaddnbd3-3bf0f5cfbe96b8aa8681f8fb26868188b52ec8e8.tar.gz
dnbd3-3bf0f5cfbe96b8aa8681f8fb26868188b52ec8e8.tar.xz
dnbd3-3bf0f5cfbe96b8aa8681f8fb26868188b52ec8e8.zip
[SERVER] Get rid of zlib dependency
We only used it for CRC-32, so now the source tree includes a stripped down version of the crc32 code from the zlib project.
Diffstat (limited to 'src/shared/crc32.h')
-rw-r--r--src/shared/crc32.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/crc32.h b/src/shared/crc32.h
new file mode 100644
index 0000000..00b8bdd
--- /dev/null
+++ b/src/shared/crc32.h
@@ -0,0 +1,9 @@
+#ifndef _CRC32_H_
+#define _CRC32_H_
+
+#include <stdint.h>
+
+uint32_t crc32(uint32_t crc, const uint8_t *buf, size_t len);
+
+#endif
+