libpq requires HAVE_CRYPTO_LOCK for thread safety with openssl <1.1.0 (#8076)

This commit is contained in:
Ian P. Cooke 2019-09-06 16:01:51 -05:00 committed by Griffin Downs
parent 257bd7a60f
commit 5a476f9c44

View File

@ -134,7 +134,7 @@ set(CMAKE_DEBUG_POSTFIX "d")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
add_library(libpq ${pg_port_src} ${pg_backend_src} ${pg_libpq_src})
target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -D_CRT_SECURE_NO_WARNINGS)
target_compile_definitions(libpq PRIVATE -DFRONTEND -DENABLE_THREAD_SAFETY -DUSE_OPENSSL -DHAVE_CRYPTO_LOCK -D_CRT_SECURE_NO_WARNINGS)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_compile_definitions(libpq PRIVATE -D_GNU_SOURCE)
endif()