mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-07-31 00:03:07 +03:00
Fix examples compilation on OSX (libargp)
This commit is contained in:
@ -26,3 +26,7 @@ endif (CMAKE_SYSTEM_NAME MATCHES "(Solaris|SunOS)")
|
|||||||
if (CMAKE_SYSTEM_NAME MATCHES "OS2")
|
if (CMAKE_SYSTEM_NAME MATCHES "OS2")
|
||||||
set(OS2 TRUE)
|
set(OS2 TRUE)
|
||||||
endif (CMAKE_SYSTEM_NAME MATCHES "OS2")
|
endif (CMAKE_SYSTEM_NAME MATCHES "OS2")
|
||||||
|
|
||||||
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
|
set (OSX TRUE)
|
||||||
|
endif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
|
@ -11,9 +11,9 @@ include_directories(
|
|||||||
${CMAKE_BINARY_DIR}
|
${CMAKE_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (BSD OR SOLARIS)
|
if (BSD OR SOLARIS OR OSX)
|
||||||
find_package(Argp)
|
find_package(Argp)
|
||||||
endif (BSD OR SOLARIS)
|
endif (BSD OR SOLARIS OR OSX)
|
||||||
|
|
||||||
if (UNIX AND NOT WIN32)
|
if (UNIX AND NOT WIN32)
|
||||||
add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
|
add_executable(libssh_scp libssh_scp.c ${examples_SRCS})
|
||||||
@ -28,7 +28,7 @@ if (UNIX AND NOT WIN32)
|
|||||||
if (WITH_SERVER)
|
if (WITH_SERVER)
|
||||||
if (HAVE_LIBUTIL)
|
if (HAVE_LIBUTIL)
|
||||||
add_executable(samplesshd-tty samplesshd-tty.c)
|
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 (HAVE_LIBUTIL)
|
||||||
endif (WITH_SERVER)
|
endif (WITH_SERVER)
|
||||||
|
|
||||||
|
@ -25,7 +25,9 @@ clients must be made or how a client should react.
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
#ifdef HAVE_PTY_H
|
||||||
#include <pty.h>
|
#include <pty.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SSHD_USER "libssh"
|
#define SSHD_USER "libssh"
|
||||||
#define SSHD_PASSWORD "libssh"
|
#define SSHD_PASSWORD "libssh"
|
||||||
|
Reference in New Issue
Block a user