aboutsummaryrefslogtreecommitdiffstats
path: root/main/libssh/link-pthread.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/libssh/link-pthread.patch')
-rw-r--r--main/libssh/link-pthread.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/main/libssh/link-pthread.patch b/main/libssh/link-pthread.patch
new file mode 100644
index 0000000000..2e2c770f6a
--- /dev/null
+++ b/main/libssh/link-pthread.patch
@@ -0,0 +1,63 @@
+diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
+index aeff201..0191d5d 100644
+--- a/examples/CMakeLists.txt
++++ b/examples/CMakeLists.txt
+@@ -13,36 +13,36 @@ include_directories(
+
+ if (LINUX)
+ add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
+- target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(libssh_scp ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(scp_download scp_download.c ${examples_SRCS})
+- target_link_libraries(scp_download ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(scp_download ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(samplessh sample.c ${examples_SRCS})
+- target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(samplessh ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(sshnetcat sshnetcat.c ${examples_SRCS})
+- target_link_libraries(sshnetcat ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(sshnetcat ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ if (WITH_SFTP)
+ add_executable(samplesftp samplesftp.c ${examples_SRCS})
+- target_link_libraries(samplesftp ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(samplesftp ${LIBSSH_SHARED_LIBRARY} pthread)
+ endif (WITH_SFTP)
+
+ if (WITH_SERVER)
+ add_executable(samplesshd samplesshd.c)
+- target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY})
++ target_link_libraries(samplesshd ${LIBSSH_SHARED_LIBRARY} pthread)
+ endif (WITH_SERVER)
+ endif (LINUX)
+
+ add_executable(exec exec.c ${examples_SRCS})
+-target_link_libraries(exec ${LIBSSH_SHARED_LIBRARY})
++target_link_libraries(exec ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(senddata senddata.c ${examples_SRCS})
+-target_link_libraries(senddata ${LIBSSH_SHARED_LIBRARY})
++target_link_libraries(senddata ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(libsshpp libsshpp.cpp)
+-target_link_libraries(libsshpp ${LIBSSH_SHARED_LIBRARY})
++target_link_libraries(libsshpp ${LIBSSH_SHARED_LIBRARY} pthread)
+
+ add_executable(libsshpp_noexcept libsshpp_noexcept.cpp)
+-target_link_libraries(libsshpp_noexcept ${LIBSSH_SHARED_LIBRARY})
++target_link_libraries(libsshpp_noexcept ${LIBSSH_SHARED_LIBRARY} pthread)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index e158665..ef2005d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -40,6 +40,7 @@ if (HAVE_LIBSOCKET)
+ set(LIBSSH_LINK_LIBRARIES
+ ${LIBSSH_LINK_LIBRARIES}
+ socket
++ pthread
+ )
+ endif (HAVE_LIBSOCKET)
+