diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2016-05-02 13:33:28 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2016-05-02 13:33:34 +0200 |
commit | 886fdc8bc2ef1b8814c8acd4b0d3e94aa19898fc (patch) | |
tree | 1d4f1e933c018b8d063abe6d93b481b5f913d46a | |
parent | 33ecaaac01eff3580d4f2832e541d520d9e116bb (diff) | |
download | libssh-886fdc8bc2ef1b8814c8acd4b0d3e94aa19898fc.tar.gz libssh-886fdc8bc2ef1b8814c8acd4b0d3e94aa19898fc.tar.xz libssh-886fdc8bc2ef1b8814c8acd4b0d3e94aa19898fc.zip |
osx: fix compilation
-rw-r--r-- | tests/torture.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/torture.c b/tests/torture.c index 8921e9e6..cec2a1fa 100644 --- a/tests/torture.c +++ b/tests/torture.c @@ -924,7 +924,11 @@ static void torture_setup_create_sshd_config(void **state) } assert_non_null(sftp_server); - snprintf(sshd_config, sizeof(sshd_config), +#ifndef OPENSSH_VERSION_MAJOR +#define OPENSSH_VERSION_MAJOR 7U +#define OPENSSH_VERSION_MINOR 0U +#endif + const char config_string[]= "Port 22\n" "ListenAddress 127.0.0.10\n" "HostKey %s\n" @@ -966,7 +970,9 @@ static void torture_setup_create_sshd_config(void **state) "AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT\n" "AcceptEnv LC_IDENTIFICATION LC_ALL LC_LIBSSH\n" "\n" - "PidFile %s\n", + "PidFile %s\n"; + snprintf(sshd_config, sizeof(sshd_config), + config_string, dsa_hostkey, rsa_hostkey, ecdsa_hostkey, |