0001-libssh2-fix-build-with-disabled-proxy-support.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 75d2b1787b3253784a94c66016829acf1f442526 Mon Sep 17 00:00:00 2001
  2. Message-Id: <75d2b1787b3253784a94c66016829acf1f442526.1603688719.git.baruch@tkos.co.il>
  3. From: Baruch Siach <baruch@tkos.co.il>
  4. Date: Mon, 26 Oct 2020 06:56:49 +0200
  5. Subject: [PATCH] libssh2: fix build with disabled proxy support
  6. Build breaks because the http_proxy field is missing:
  7. vssh/libssh2.c: In function 'ssh_connect':
  8. vssh/libssh2.c:3119:10: error: 'struct connectdata' has no member named 'http_proxy'
  9. if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) {
  10. ^
  11. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  12. ---
  13. Upstream status: https://github.com/curl/curl/pull/6125
  14. lib/vssh/libssh2.c | 5 ++++-
  15. 1 file changed, 4 insertions(+), 1 deletion(-)
  16. diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
  17. index 6c6db049bf5a..74cd5d887549 100644
  18. --- a/lib/vssh/libssh2.c
  19. +++ b/lib/vssh/libssh2.c
  20. @@ -3094,6 +3094,7 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
  21. return CURLE_FAILED_INIT;
  22. }
  23. +#ifndef CURL_DISABLE_PROXY
  24. if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) {
  25. /*
  26. * This crazy union dance is here to avoid assigning a void pointer a
  27. @@ -3132,7 +3133,9 @@ static CURLcode ssh_connect(struct connectdata *conn, bool *done)
  28. libssh2_session_callback_set(ssh->ssh_session,
  29. LIBSSH2_CALLBACK_SEND, sshsend.sendp);
  30. }
  31. - else if(conn->handler->protocol & CURLPROTO_SCP) {
  32. + else
  33. +#endif /* CURL_DISABLE_PROXY */
  34. + if(conn->handler->protocol & CURLPROTO_SCP) {
  35. conn->recv[FIRSTSOCKET] = scp_recv;
  36. conn->send[FIRSTSOCKET] = scp_send;
  37. }
  38. --
  39. 2.28.0