Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get the libssh2 version at runtime if possible #7768

Closed
wants to merge 1 commit into from

Conversation

@JDepooter
Copy link
Contributor

@JDepooter JDepooter commented Sep 23, 2021

Previously this code used a compile time constant, meaning that libcurl always reported the libssh2 version that libcurl was built with. This could differ from the libssh2 version being used at runtime. The new code uses the CURL_LIBSSH2_VERSION macro, which is defined in ssh.h. The macro calls the libssh2_version function if it is available, otherwise it falls back to the compile time version.

Previously this code used a compile time constant, meaning that libcurl always reported the libssh2 version that libcurl was built with. This could differ from the libssh2 version actually being used. The new code uses the CURL_LIBSSH2_VERSION macro, which is defined in ssh.h. The macro calls the libssh2_version function if it is available, otherwise it falls back to the compile time version.
@jay jay added the SCP/SFTP label Sep 24, 2021
@jay jay closed this in 739de69 Sep 24, 2021
@jay
Copy link
Member

@jay jay commented Sep 24, 2021

Thanks

@JDepooter JDepooter deleted the runtime_libssh2_version branch Sep 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants