summaryrefslogtreecommitdiffstats
path: root/0001-fix-multiple-definition-of-crc32c-GCC-10.patch
diff options
context:
space:
mode:
Diffstat (limited to '0001-fix-multiple-definition-of-crc32c-GCC-10.patch')
-rw-r--r--0001-fix-multiple-definition-of-crc32c-GCC-10.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/0001-fix-multiple-definition-of-crc32c-GCC-10.patch b/0001-fix-multiple-definition-of-crc32c-GCC-10.patch
new file mode 100644
index 0000000..10d0fc7
--- /dev/null
+++ b/0001-fix-multiple-definition-of-crc32c-GCC-10.patch
@@ -0,0 +1,39 @@
+From 8e6b12f96886412d47894f56193b3b92bd4a850e Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Mon, 9 Mar 2020 13:04:06 +0100
+Subject: [PATCH] fix multiple definition of 'crc32c' (GCC 10)
+
+---
+ crc32c.c | 2 ++
+ crc32c.h | 2 +-
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/crc32c.c b/crc32c.c
+index a4296a7..a3c526e 100644
+--- a/crc32c.c
++++ b/crc32c.c
+@@ -46,6 +46,8 @@
+ #endif
+ #include "crc32c.h"
+
++crc_func crc32c;
++
+ /* CRC-32C (iSCSI) polynomial in reversed bit order. */
+ #define POLY 0x82f63b78
+
+diff --git a/crc32c.h b/crc32c.h
+index 8b030de..c09cb42 100644
+--- a/crc32c.h
++++ b/crc32c.h
+@@ -2,7 +2,7 @@
+ #define CRC32C_H
+
+ typedef uint32_t (*crc_func)(uint32_t crc, const void *buf, size_t len);
+-crc_func crc32c;
++extern crc_func crc32c;
+
+ void crc32c_init(void);
+
+--
+2.24.1
+