diff options
| author | Aris Adamantiadis <aris@0xbadc0de.be> | 2013-11-03 13:45:15 +0100 |
|---|---|---|
| committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2013-11-03 13:51:03 +0100 |
| commit | 5bc32bfd88b75c9bd2d63f4e319c817cffce7cd8 (patch) | |
| tree | c91e24dc4490aea93116922e74bca1e4c3eaebf9 /examples | |
| parent | 7c8a793b0a53182566a275fb43d5a1e868c792e4 (diff) | |
| download | libssh-5bc32bfd88b75c9bd2d63f4e319c817cffce7cd8.tar.gz libssh-5bc32bfd88b75c9bd2d63f4e319c817cffce7cd8.tar.xz libssh-5bc32bfd88b75c9bd2d63f4e319c817cffce7cd8.zip | |
Fix examples compilation on OSX (libargp)
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/CMakeLists.txt | 6 | ||||
| -rw-r--r-- | examples/samplesshd-tty.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index fc1c9341..c155e097 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -11,9 +11,9 @@ include_directories( ${CMAKE_BINARY_DIR} ) -if (BSD OR SOLARIS) +if (BSD OR SOLARIS OR OSX) find_package(Argp) -endif (BSD OR SOLARIS) +endif (BSD OR SOLARIS OR OSX) if (UNIX AND NOT WIN32) add_executable(libssh_scp libssh_scp.c ${examples_SRCS}) @@ -28,7 +28,7 @@ if (UNIX AND NOT WIN32) if (WITH_SERVER) if (HAVE_LIBUTIL) add_executable(samplesshd-tty samplesshd-tty.c) - target_link_libraries(samplesshd-tty ${LIBSSH_SHARED_LIBRARY} util) + target_link_libraries(samplesshd-tty ${LIBSSH_SHARED_LIBRARY} ${ARGP_LIBRARIES} util) endif (HAVE_LIBUTIL) endif (WITH_SERVER) diff --git a/examples/samplesshd-tty.c b/examples/samplesshd-tty.c index 7ed70d3d..b9831855 100644 --- a/examples/samplesshd-tty.c +++ b/examples/samplesshd-tty.c @@ -25,7 +25,9 @@ clients must be made or how a client should react. #include <string.h> #include <stdio.h> #include <poll.h> +#ifdef HAVE_PTY_H #include <pty.h> +#endif #define SSHD_USER "libssh" #define SSHD_PASSWORD "libssh" |
