summaryrefslogtreecommitdiffstats
path: root/php-upstream.patch
blob: b5a46d3025428d5a0d9551bebf72d04fa9c4f825 (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
40
41
42
43
44
45
46
47
48
49
From b83bfb2c5444865515673ff5da939b5f75604128 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Tue, 22 Jun 2021 18:42:43 +0200
Subject: [PATCH] make new API public (#7185)

---
 ext/standard/crc32.c | 4 ++--
 ext/standard/crc32.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c
index c492a9602c3b5..8b4fa085058a3 100644
--- a/ext/standard/crc32.c
+++ b/ext/standard/crc32.c
@@ -89,7 +89,7 @@ static uint32_t crc32_aarch64(uint32_t crc, char *p, size_t nr) {
 # endif
 #endif
 
-uint32_t crc32_bulk_update(uint32_t crc, const char *p, size_t nr)
+PHPAPI uint32_t crc32_bulk_update(uint32_t crc, const char *p, size_t nr)
 {
 #if HAVE_AARCH64_CRC32
 	if (has_crc32_insn()) {
@@ -112,7 +112,7 @@ uint32_t crc32_bulk_update(uint32_t crc, const char *p, size_t nr)
 	return crc;
 }
 
-int crc32_stream_bulk_update(uint32_t *crc, php_stream *fp, size_t nr)
+PHPAPI int crc32_stream_bulk_update(uint32_t *crc, php_stream *fp, size_t nr)
 {
 	size_t handled = 0, n;
 	char buf[1024];
diff --git a/ext/standard/crc32.h b/ext/standard/crc32.h
index 262713fd5ec8c..1de234208aa9e 100644
--- a/ext/standard/crc32.h
+++ b/ext/standard/crc32.h
@@ -23,10 +23,10 @@
 
 #define CRC32(crc, ch)	 (crc = (crc >> 8) ^ crc32tab[(crc ^ (ch)) & 0xff])
 
-uint32_t crc32_bulk_update(uint32_t crc, const char *p, size_t nr);
+PHPAPI uint32_t crc32_bulk_update(uint32_t crc, const char *p, size_t nr);
 
 /* Return FAILURE if stream reading fail */
-int crc32_stream_bulk_update(uint32_t *crc, php_stream *fp, size_t nr);
+PHPAPI int crc32_stream_bulk_update(uint32_t *crc, php_stream *fp, size_t nr);
 
 /* generated using the AUTODIN II polynomial
  *	x^32 + x^26 + x^23 + x^22 + x^16 +