summaryrefslogtreecommitdiffstats
path: root/0001-fix-multiple-definition-of-crc32c-GCC-10.patch
blob: 10d0fc7ccdf7160629a7ef9deb1f5a3f6895bebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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