aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-02-07 13:17:42 -0800
committerEric Biggers <ebiggers@google.com>2019-02-07 13:17:42 -0800
commit23a20ab7e8371cc29015d7d5787daa73f2ddd374 (patch)
tree4be7e36e12c6472de6612bf2ef29b63ee7fb6768
parentbdebc45b4527d64109723ad5753fa514bac47c9f (diff)
downloadfsverity-utils-23a20ab7e8371cc29015d7d5787daa73f2ddd374.tar.gz
Make crc32c_table.h self-contained
Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r--crc32c_table.h4
-rw-r--r--scripts/gen_crc32c_table.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/crc32c_table.h b/crc32c_table.h
index 4c3dafb..822c0a6 100644
--- a/crc32c_table.h
+++ b/crc32c_table.h
@@ -4,7 +4,9 @@
* This file was automatically generated by scripts/gen_crc32c_table.c
*/
-static const u32 crc32c_table[] = {
+#include <stdint.h>
+
+static const uint32_t crc32c_table[] = {
0x00000000, 0xf26b8303, 0xe13b70f7, 0x1350f3f4,
0xc79a971f, 0x35f1141c, 0x26a1e7e8, 0xd4ca64eb,
0x8ad958cf, 0x78b2dbcc, 0x6be22838, 0x9989ab3b,
diff --git a/scripts/gen_crc32c_table.c b/scripts/gen_crc32c_table.c
index 1c5af88..656a349 100644
--- a/scripts/gen_crc32c_table.c
+++ b/scripts/gen_crc32c_table.c
@@ -47,7 +47,9 @@ int main(void)
printf(" * This file was automatically generated by scripts/gen_crc32c_table.c\n");
printf(" */\n");
printf("\n");
- printf("static const u32 crc32c_table[] = {\n");
+ printf("#include <stdint.h>\n");
+ printf("\n");
+ printf("static const uint32_t crc32c_table[] = {\n");
for (i = 0; i < 64; i++) {
printf("\t");
for (j = 0; j < 4; j++) {