mirror of
https://github.com/curl/curl.git
synced 2024-12-03 06:20:31 +08:00
ssh: deduplicate SSH backend includes (and fix libssh cmake unity build)
For libssh, it fixes a "unity" build issue where libssh deprecation warnings were not suppressed before this patch, because the suppression macro was only set before just one of the two `libssh.h` includes. If the other was compiled first in unity mode, the warnings appeared. Seen in local curl-for-win build (`CW_CONFIG=test-x64-libssh-quictls`) with libssh 0.11.0. (Also in a GHA/macos cmake job upcoming in #14614) Use this opportunity to drop duplicate SSH header includes from the SSH modules. It's enough to include them via the common `ssh.h` header. Closes #14612
This commit is contained in:
parent
440d00d17e
commit
ac207bf567
@ -31,11 +31,6 @@
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
/* in 0.10.0 or later, ignore deprecated warnings */
|
||||
#define SSH_SUPPRESS_DEPRECATED
|
||||
#include <libssh/libssh.h>
|
||||
#include <libssh/sftp.h>
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
|
@ -30,9 +30,6 @@
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include <libssh2.h>
|
||||
#include <libssh2_sftp.h>
|
||||
|
||||
#ifdef HAVE_FCNTL_H
|
||||
#include <fcntl.h>
|
||||
#endif
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include <libssh2.h>
|
||||
#include <libssh2_sftp.h>
|
||||
#elif defined(USE_LIBSSH)
|
||||
/* in 0.10.0 or later, ignore deprecated warnings */
|
||||
#define SSH_SUPPRESS_DEPRECATED
|
||||
#include <libssh/libssh.h>
|
||||
#include <libssh/sftp.h>
|
||||
#elif defined(USE_WOLFSSH)
|
||||
|
@ -28,8 +28,6 @@
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include <wolfssh/ssh.h>
|
||||
#include <wolfssh/wolfsftp.h>
|
||||
#include "urldata.h"
|
||||
#include "cfilters.h"
|
||||
#include "connect.h"
|
||||
|
Loading…
Reference in New Issue
Block a user