Skip to content

Commit 859ce12

Browse files
committed
Avoid symbol collision with aklomp/base64
In static builds, symbol collisions are possible since the functions are named the same. Embed the base64 library in the only file where it's used and make all its functions static.
1 parent 91fa41a commit 859ce12

File tree

5 files changed

+277
-307
lines changed

5 files changed

+277
-307
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ add_custom_target(gen_jwt_checker ALL DEPENDS jwt-checker.i)
9595
add_dependencies(jwt gen_jwt_builder gen_jwt_checker)
9696
add_dependencies(jwt_static gen_jwt_builder gen_jwt_checker)
9797

98-
set(JWT_SOURCES libjwt/base64.c
99-
libjwt/jwt-memory.c
98+
set(JWT_SOURCES libjwt/jwt-memory.c
10099
libjwt/jwt.c
101100
libjwt/jwks.c
102101
libjwt/jwt-setget.c

libjwt/base64.c

Lines changed: 0 additions & 165 deletions
This file was deleted.

libjwt/base64.h

Lines changed: 0 additions & 25 deletions
This file was deleted.

libjwt/jwt-encode.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
#include <jwt.h>
1414

15-
#include "base64.h"
16-
1715
#include "jwt-private.h"
1816

1917
static int write_js(const json_t *js, char **buf)

0 commit comments

Comments
 (0)