aboutsummaryrefslogtreecommitdiff
path: root/tests/torture.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-02-13 11:54:56 +0100
committerAndreas Schneider <asn@cryptomilk.org>2011-02-13 11:56:47 +0100
commitcbcd5668f55dffa29b461cfee5b876d585bdbe04 (patch)
treebcfa6d8f30fc4bde7a265bab38e7cc1b37b20544 /tests/torture.c
parentfdd1cb18d0d70965eb19ea9984449ee9a3cab932 (diff)
downloadlibssh-cbcd5668f55dffa29b461cfee5b876d585bdbe04.tar.gz
libssh-cbcd5668f55dffa29b461cfee5b876d585bdbe04.tar.xz
libssh-cbcd5668f55dffa29b461cfee5b876d585bdbe04.zip
torture: Fixed torture on Windows.
Diffstat (limited to 'tests/torture.c')
-rw-r--r--tests/torture.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/torture.c b/tests/torture.c
index e24ef44..1d45e42 100644
--- a/tests/torture.c
+++ b/tests/torture.c
@@ -21,13 +21,15 @@
* MA 02111-1307, USA.
*/
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <errno.h>
+#include "config.h"
+
#include <stdio.h>
#include <stdlib.h>
#ifndef _WIN32
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <dirent.h>
+# include <errno.h>
# include <unistd.h>
#endif
@@ -35,6 +37,7 @@
static int verbosity = 0;
+#ifndef _WIN32
static int _torture_auth_kbdint(ssh_session session,
const char *password) {
const char *prompt;
@@ -146,10 +149,6 @@ int torture_isdir(const char *path) {
return 0;
}
-int torture_libssh_verbosity(void){
- return verbosity;
-}
-
ssh_session torture_ssh_session(const char *host,
const char *user,
const char *password) {
@@ -281,6 +280,11 @@ void torture_sftp_close(struct torture_sftp *t) {
free(t->testdir);
free(t);
}
+#endif
+
+int torture_libssh_verbosity(void){
+ return verbosity;
+}
int main(int argc, char **argv) {
struct argument_s arguments;