libssh: ignore deprecation warnings

libssh 0.10.0 marks all SCP functions as "deprecated" which causes
compiler warnings and errors in our CI jobs and elsewhere. Ignore
deprecation warnings if 0.10.0 or later is found in the build.

If they actually remove the functions at a later point, then someone can
deal with that pain and functionality break then.

Fixes #9382
Closes #9383
This commit is contained in:
Daniel Stenberg 2022-08-29 09:17:54 +02:00
parent aec8d30624
commit 74e156d00f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -96,6 +96,13 @@
#include "curl_memory.h"
#include "memdebug.h"
/* in 0.10.0 or later, ignore deprecated warnings */
#if defined(__GNUC__) && \
(LIBSSH_VERSION_MINOR >= 10) || \
(LIBSSH_VERSION_MAJOR > 0)
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
/* A recent macro provided by libssh. Or make our own. */
#ifndef SSH_STRING_FREE_CHAR
#define SSH_STRING_FREE_CHAR(x) \