diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2013-11-03 14:09:28 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2013-11-03 14:10:04 +0100 |
commit | ebf4a03908e9d5cc728af675f4f235c315241f99 (patch) | |
tree | f5e41e5a9980c7aa08496ecd78d1577f88d44c3b | |
parent | 4f3ee2fc7e24668eee3f72c59d3766a7ba2d49c2 (diff) | |
download | libssh-ebf4a03908e9d5cc728af675f4f235c315241f99.tar.gz libssh-ebf4a03908e9d5cc728af675f4f235c315241f99.tar.xz libssh-ebf4a03908e9d5cc728af675f4f235c315241f99.zip |
examples: fix forktty() warning on OSX
-rw-r--r-- | ConfigureChecks.cmake | 1 | ||||
-rw-r--r-- | config.h.cmake | 3 | ||||
-rw-r--r-- | examples/samplesshd-tty.c | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index e5233eeb..472fe79e 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -50,6 +50,7 @@ check_include_file(argp.h HAVE_ARGP_H) check_include_file(pty.h HAVE_PTY_H) check_include_file(termios.h HAVE_TERMIOS_H) check_include_file(unistd.h HAVE_UNISTD_H) +check_include_file(util.h HAVE_UTIL_H) if (WIN32) check_include_files("winsock2.h;ws2tcpip.h;wspiapi.h" HAVE_WSPIAPI_H) diff --git a/config.h.cmake b/config.h.cmake index a4bf4f13..7e8cb6a8 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -20,6 +20,9 @@ /* Define to 1 if you have the <pty.h> header file. */ #cmakedefine HAVE_PTY_H 1 +/* Define to 1 if you have the <util.h> header file. */ +#cmakedefine HAVE_UTIL_H 1 + /* Define to 1 if you have the <termios.h> header file. */ #cmakedefine HAVE_TERMIOS_H 1 diff --git a/examples/samplesshd-tty.c b/examples/samplesshd-tty.c index b9831855..83b75648 100644 --- a/examples/samplesshd-tty.c +++ b/examples/samplesshd-tty.c @@ -28,7 +28,9 @@ clients must be made or how a client should react. #ifdef HAVE_PTY_H #include <pty.h> #endif - +#ifdef HAVE_UTIL_H +#include <util.h> +#endif #define SSHD_USER "libssh" #define SSHD_PASSWORD "libssh" |