Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang needs stdlib included in a couple of files #24

Open
sptrakesh opened this issue Dec 17, 2023 · 0 comments
Open

clang needs stdlib included in a couple of files #24

sptrakesh opened this issue Dec 17, 2023 · 0 comments

Comments

@sptrakesh
Copy link

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant