Fix the standalone shared library build.
BUG=473360
Change-Id: I6dc06eb425dd10c8d6a40d17f94405ea6f2f3905
Reviewed-on: https://boringssl-review.googlesource.com/4210
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
index 9eb9452..1e5806e 100644
--- a/crypto/CMakeLists.txt
+++ b/crypto/CMakeLists.txt
@@ -189,6 +189,10 @@
$<TARGET_OBJECTS:pkcs8>
)
+if(NOT MSVC)
+ target_link_libraries(crypto pthread)
+endif()
+
add_executable(
constant_time_test
@@ -203,11 +207,7 @@
thread_test.c
)
-if(MSVC)
- target_link_libraries(thread_test crypto)
-else()
- target_link_libraries(thread_test crypto pthread)
-endif()
+target_link_libraries(thread_test crypto)
perlasm(cpu-x86_64-asm.${ASM_EXT} cpu-x86_64-asm.pl)
perlasm(cpu-x86-asm.${ASM_EXT} cpu-x86-asm.pl)
diff --git a/crypto/x509v3/CMakeLists.txt b/crypto/x509v3/CMakeLists.txt
index f94bbc2..192785e 100644
--- a/crypto/x509v3/CMakeLists.txt
+++ b/crypto/x509v3/CMakeLists.txt
@@ -49,11 +49,15 @@
v3nametest.c
)
-add_executable(
- tab_test
-
- tabtest.c
-)
-
target_link_libraries(v3name_test crypto)
-target_link_libraries(tab_test crypto)
+
+if (NOT BUILD_SHARED_LIBS)
+ # TODO(davidben): Fix the shared library build of tab_test.
+ add_executable(
+ tab_test
+
+ tabtest.c
+ )
+
+ target_link_libraries(tab_test crypto)
+endif()
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index 4026fc9..563da67 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -2224,7 +2224,7 @@
/* SSL_CTX_set_dos_protection_cb sets a callback that is called once the
* resumption decision for a ClientHello has been made. It can return 1 to
* allow the handshake to continue or zero to cause the handshake to abort. */
-void SSL_CTX_set_dos_protection_cb(
+OPENSSL_EXPORT void SSL_CTX_set_dos_protection_cb(
SSL_CTX *ctx, int (*cb)(const struct ssl_early_callback_ctx *));
/* SSL_get_structure_sizes returns the sizes of the SSL, SSL_CTX and