Created
September 28, 2013 23:26
-
-
Save haad/6747755 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/examples/samplesshd-tty.c b/examples/samplesshd-tty.c | |
index 7ed70d3..a0d6062 100644 | |
--- a/examples/samplesshd-tty.c | |
+++ b/examples/samplesshd-tty.c | |
@@ -25,7 +25,12 @@ clients must be made or how a client should react. | |
#include <string.h> | |
#include <stdio.h> | |
#include <poll.h> | |
+ | |
+#ifdef __APPLE__ | |
+#include <util.h> | |
+#else | |
#include <pty.h> | |
+#endif | |
#define SSHD_USER "libssh" | |
#define SSHD_PASSWORD "libssh" | |
@@ -69,6 +74,9 @@ static int auth_password(const char *user, const char *password){ | |
return 0; | |
return 1; // authenticated | |
} | |
+ | |
+static int port = 22; | |
+ | |
#ifdef HAVE_ARGP_H | |
const char *argp_program_version = "libssh server example " | |
SSH_STRINGIFY(LIBSSH_VERSION); | |
@@ -80,8 +88,6 @@ static char doc[] = "libssh -- a Secure Shell protocol implementation"; | |
/* A description of the arguments we accept. */ | |
static char args_doc[] = "BINDADDR"; | |
-static int port = 22; | |
- | |
/* The options we understand. */ | |
static struct argp_option options[] = { | |
{ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment