Skip to content

Commit 1378a1a

Browse files
Quote LIBCRYPTO_PATH for dynamic load test
1 parent 37e528a commit 1378a1a

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

crypto/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ if(BUILD_TESTING)
883883
endif()
884884

885885
if (BUILD_SHARED_LIBS AND NOT WIN32)
886-
target_compile_options(${DYNAMIC_LOADING_TEST_EXEC} PUBLIC "-DLIBCRYPTO_PATH=$<TARGET_FILE:crypto>")
886+
target_compile_options(${DYNAMIC_LOADING_TEST_EXEC} PUBLIC "-DLIBCRYPTO_PATH=\"$<TARGET_FILE:crypto>\"")
887887
# Do not link to boringssl_gtest_main or any library that might be linked to libcrypto.so.
888888
if(ANDROID)
889889
target_link_libraries(${DYNAMIC_LOADING_TEST_EXEC} PUBLIC boringssl_gtest ${DYNAMIC_LINKER_LIB})

crypto/dynamic_loading_test.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,9 @@ static void *load_unload(void *ctx) {
8989
}
9090

9191

92-
#define xstr(s) str(s)
93-
#define str(s) #s
94-
#define DYNAMIC_LIBRARY_PATH xstr(LIBCRYPTO_PATH)
95-
96-
9792
int main(int argc, char *argv[]) {
9893
pthread_t thread_id;
99-
if (pthread_create(&thread_id, NULL, load_unload, (void*)DYNAMIC_LIBRARY_PATH)) {
94+
if (pthread_create(&thread_id, NULL, load_unload, (void*)LIBCRYPTO_PATH)) {
10095
fprintf(stderr, "Call to pthread_create in main failed.");
10196
exit(1);
10297
}

0 commit comments

Comments
 (0)