summaryrefslogtreecommitdiffstats
path: root/include/crc32c.h
diff options
context:
space:
mode:
authorJohn Groves2017-11-16 06:01:38 +0100
committerKarel Zak2017-11-16 11:44:39 +0100
commit277e777fe8839b2434ddd394810a5fef86a61fab (patch)
tree256857efe40eb5d72baf10fe137d304f388f4deb /include/crc32c.h
parentmount: add more details about UUIDs and LABELs to the man page (diff)
downloadkernel-qcow2-util-linux-277e777fe8839b2434ddd394810a5fef86a61fab.tar.gz
kernel-qcow2-util-linux-277e777fe8839b2434ddd394810a5fef86a61fab.tar.xz
kernel-qcow2-util-linux-277e777fe8839b2434ddd394810a5fef86a61fab.zip
lib: Add simple crc32c() function
Source: freebsd/sys/libkern/crc32.c This code is an unmodified fragment from the source. Will fixup comments / naming in next commit Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/crc32c.h')
-rw-r--r--include/crc32c.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/crc32c.h b/include/crc32c.h
new file mode 100644
index 000000000..1c5083941
--- /dev/null
+++ b/include/crc32c.h
@@ -0,0 +1,9 @@
+#ifndef UL_NG_CRC32C_H
+#define UL_NG_CRC32C_H
+
+#include <sys/types.h>
+#include <stdint.h>
+
+extern uint32_t crc32c(uint32_t crc, const void *buf, size_t size);
+
+#endif /* UL_NG_CRC32C_H */