summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-08-29 09:17:54 +0200
committerDaniel Stenberg <daniel@haxx.se>2022-08-29 10:54:39 +0200
commit74e156d00f9f0979a360576ba487f57c35784a14 (patch)
treeddaf009c38d66023f5d457ddf8ba9fa370d35e27
parentaec8d30624d18c4b47b9fc2d929c5981d5428082 (diff)
downloadcurl-74e156d00f9f0979a360576ba487f57c35784a14.tar.gz
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
-rw-r--r--lib/vssh/libssh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/vssh/libssh.c b/lib/vssh/libssh.c
index e0d9d71ae..a078c464d 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) \