mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
tests: fix OSX build errors when enabling tests
Fix OSX build error about embedding a directive within macro arguments. Apparently, snprintf is implemented as a macro on that platform. Signed-off-by: Alberto Aguirre <albaguirre@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
85ab4ee53a
commit
dd20253fec
@@ -681,16 +681,24 @@ static void torture_setup_create_sshd_config(void **state)
|
|||||||
}
|
}
|
||||||
assert_non_null(sftp_server);
|
assert_non_null(sftp_server);
|
||||||
|
|
||||||
|
#ifdef HAVE_DSA
|
||||||
snprintf(sshd_config, sizeof(sshd_config),
|
snprintf(sshd_config, sizeof(sshd_config),
|
||||||
config_string,
|
config_string,
|
||||||
#ifdef HAVE_DSA
|
|
||||||
dsa_hostkey,
|
dsa_hostkey,
|
||||||
#endif
|
|
||||||
rsa_hostkey,
|
rsa_hostkey,
|
||||||
ecdsa_hostkey,
|
ecdsa_hostkey,
|
||||||
trusted_ca_pubkey,
|
trusted_ca_pubkey,
|
||||||
sftp_server,
|
sftp_server,
|
||||||
s->srv_pidfile);
|
s->srv_pidfile);
|
||||||
|
#else
|
||||||
|
snprintf(sshd_config, sizeof(sshd_config),
|
||||||
|
config_string,
|
||||||
|
rsa_hostkey,
|
||||||
|
ecdsa_hostkey,
|
||||||
|
trusted_ca_pubkey,
|
||||||
|
sftp_server,
|
||||||
|
s->srv_pidfile);
|
||||||
|
#endif
|
||||||
|
|
||||||
torture_write_file(s->srv_config, sshd_config);
|
torture_write_file(s->srv_config, sshd_config);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user