[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: fix pkd build breakages
[Thread Prev] | [Thread Next]
- Subject: [PATCH] tests: fix pkd build breakages
- From: Jon Simons <jon@xxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Mon, 13 Oct 2014 05:41:40 -0700
- To: libssh@xxxxxxxxxx
Hi, Attached is a patch which should fix '-DWITH_SERVER=OFF', OpenIndiana, and FreeBSD builds. -Jon
From 238fbb9fe43a61f8316068534bcf9d3249d7ab3d Mon Sep 17 00:00:00 2001 From: Jon Simons <jon@xxxxxxxxxxxxx> Date: Mon, 13 Oct 2014 03:06:39 -0700 Subject: [PATCH] tests: fix pkd build breakages Fix a build breakage when '-DWITH_SERVER=OFF' is set: skip building the pkd test for that case. Add some missing includes for the OpenIndiana and FreeBSD builds. Signed-off-by: Jon Simons <jon@xxxxxxxxxxxxx> --- tests/CMakeLists.txt | 4 +++- tests/pkd/CMakeLists.txt | 4 ++-- tests/pkd/pkd_daemon.c | 3 +++ tests/pkd/pkd_util.c | 1 + 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cba1d30..7cdb2c4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -47,4 +47,6 @@ if (WITH_BENCHMARKS) add_subdirectory(benchmarks) endif (WITH_BENCHMARKS) -add_subdirectory(pkd) +if (WITH_SERVER) + add_subdirectory(pkd) +endif (WITH_SERVER) diff --git a/tests/pkd/CMakeLists.txt b/tests/pkd/CMakeLists.txt index d438959..515dae1 100644 --- a/tests/pkd/CMakeLists.txt +++ b/tests/pkd/CMakeLists.txt @@ -1,6 +1,6 @@ project(pkd C) -if (UNIX AND NOT WIN32) +if (WITH_SERVER AND UNIX AND NOT WIN32) include_directories( ${LIBSSH_PUBLIC_INCLUDE_DIRS} @@ -32,4 +32,4 @@ set(pkd_libs add_executable(pkd_hello ${pkd_hello_src}) target_link_libraries(pkd_hello ${pkd_libs}) -endif (UNIX AND NOT WIN32) +endif (WITH_SERVER AND UNIX AND NOT WIN32) diff --git a/tests/pkd/pkd_daemon.c b/tests/pkd/pkd_daemon.c index de4e536..07736fa 100644 --- a/tests/pkd/pkd_daemon.c +++ b/tests/pkd/pkd_daemon.c @@ -8,11 +8,14 @@ */ #include <errno.h> +#include <netinet/in.h> #include <pthread.h> #include <signal.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> +#include <sys/types.h> +#include <sys/socket.h> #include <libssh/callbacks.h> #include <libssh/libssh.h> diff --git a/tests/pkd/pkd_util.c b/tests/pkd/pkd_util.c index 95d3be6..963b58d 100644 --- a/tests/pkd/pkd_util.c +++ b/tests/pkd/pkd_util.c @@ -7,6 +7,7 @@ #include <signal.h> #include <stdio.h> #include <stdlib.h> +#include <sys/wait.h> #include "pkd_client.h" #include "pkd_util.h" -- 1.9.1
Archive administrator: postmaster@lists.cynapses.org