powturbo / Turbo-Base64

Turbo Base64 - Fastest Base64 SIMD:SSE/AVX2/AVX512/Neon/Altivec - Faster than memcpy!
GNU General Public License v3.0
264 stars 40 forks source link

clang needs stdlib included in a couple of files #24

Open sptrakesh opened 9 months ago

sptrakesh commented 9 months ago

Hello,

Compilation fails on Apple Clang as a couple of files need to include stdlib.h.

Please add includes to turbob64c.c and turbob64v128.c.

diff --git a/turbob64c.c b/turbob64c.c
index f52be2d..8598f1d 100644
--- a/turbob64c.c
+++ b/turbob64c.c
@@ -24,6 +24,7 @@
 // Turbo-Base64: Scalar encode
 #include "turbob64_.h"
 #include "turbob64.h"
+#include <stdlib.h>

 size_t tb64enclen(size_t n) { return TB64ENCLEN(n); }

diff --git a/turbob64v128.c b/turbob64v128.c
index b1f2ba0..d0cdc4d 100644
--- a/turbob64v128.c
+++ b/turbob64v128.c
@@ -24,6 +24,7 @@
 //  Turbo-Base64: ssse3 + arm neon functions (see also turbob64v256)

 #include <string.h>
+#include <stdlib.h>

   #if defined(__AVX__)
 #include <immintrin.h>