Fix clang 3.4 and OpenSSL 0.9.8 CE.

GitOrigin-RevId: 9157bfe975bdb376fbd573bd23107c36b1444f34
This commit is contained in:
levlam 2019-09-09 02:04:30 +03:00
parent c03b2396fa
commit ef5e709ac8
2 changed files with 5 additions and 2 deletions

View File

@ -49,10 +49,10 @@ add_library(tdnet STATIC ${TDNET_SOURCE})
target_include_directories(tdnet PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_include_directories(tdnet SYSTEM PRIVATE $<BUILD_INTERFACE:${OPENSSL_INCLUDE_DIR}>)
target_link_libraries(tdnet PUBLIC tdutils tdactor PRIVATE ${CMAKE_DL_LIBS} ${ZLIB_LIBRARIES})
target_link_libraries(tdnet PRIVATE ${OPENSSL_CRYPTO_LIBRARY})
if (NOT EMSCRIPTEN)
target_link_libraries(tdnet PRIVATE ${OPENSSL_SSL_LIBRARY})
endif()
target_link_libraries(tdnet PRIVATE ${OPENSSL_CRYPTO_LIBRARY})
if (WIN32)
target_link_libraries(tdnet PRIVATE Crypt32)

View File

@ -31,7 +31,10 @@ class ThreadPthread {
ThreadPthread() = default;
ThreadPthread(const ThreadPthread &other) = delete;
ThreadPthread &operator=(const ThreadPthread &other) = delete;
ThreadPthread(ThreadPthread &&) = default;
ThreadPthread(ThreadPthread &&other) noexcept
: is_inited_(std::move(other.is_inited_))
, thread_(other.thread_) {
}
ThreadPthread &operator=(ThreadPthread &&other) {
join();
is_inited_ = std::move(other.is_inited_);