summaryrefslogtreecommitdiffhomepage
path: root/archival/libunarchive/unxz/xz_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libunarchive/unxz/xz_stream.h')
-rw-r--r--archival/libunarchive/unxz/xz_stream.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/archival/libunarchive/unxz/xz_stream.h b/archival/libunarchive/unxz/xz_stream.h
index efbe75ae3..36f2a7cbf 100644
--- a/archival/libunarchive/unxz/xz_stream.h
+++ b/archival/libunarchive/unxz/xz_stream.h
@@ -10,10 +10,10 @@
#ifndef XZ_STREAM_H
#define XZ_STREAM_H
-#if defined(__KERNEL__) && !defined(XZ_INTERNAL_CRC32)
+#if defined(__KERNEL__) && !XZ_INTERNAL_CRC32
# include <linux/crc32.h>
# undef crc32
-# define xz_crc32(crc32_table, buf, size, crc) \
+# define xz_crc32(buf, size, crc) \
(~crc32_le(~(uint32_t)(crc), buf, size))
#endif
@@ -43,4 +43,15 @@ typedef uint64_t vli_type;
/* Maximum encoded size of a VLI */
#define VLI_BYTES_MAX (sizeof(vli_type) * 8 / 7)
+/* Integrity Check types */
+enum xz_check {
+ XZ_CHECK_NONE = 0,
+ XZ_CHECK_CRC32 = 1,
+ XZ_CHECK_CRC64 = 4,
+ XZ_CHECK_SHA256 = 10
+};
+
+/* Maximum possible Check ID */
+#define XZ_CHECK_MAX 15
+
#endif