From 74e156d00f9f0979a360576ba487f57c35784a14 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 29 Aug 2022 09:17:54 +0200 Subject: [PATCH] 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 --- lib/vssh/libssh.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c index e0d9d71ae6..a078c464dd 100644 --- a/lib/vssh/libssh.c +++ b/lib/vssh/libssh.c @@ -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) \ -- 2.47.3