From: Pino Toscano Date: Thu, 19 Mar 2020 11:02:45 +0000 (+0100) Subject: tests: switch away from HAVE_SOCKETPAIR X-Git-Tag: v6.2.0-rc1~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77696510e2c4f9c70a7e9bf5e258fc19a61775b0;p=thirdparty%2Flibvirt.git tests: switch away from HAVE_SOCKETPAIR Since the removal of gnulib, HAVE_SOCKETPAIR is no more defined, making these two tests effectively skipped. Use the same strategy used in other generic library bits, i.e. exclude the socketpair usage on Windows. Semi-related change in virnetdaemontest.c to make it build: since virutil.h does not include unistd.h anymore, we need to include it. Signed-off-by: Pino Toscano Reviewed-by: Daniel P. Berrangé --- diff --git a/tests/virnetdaemontest.c b/tests/virnetdaemontest.c index 825487f0a1..09d268627c 100644 --- a/tests/virnetdaemontest.c +++ b/tests/virnetdaemontest.c @@ -18,13 +18,15 @@ #include +#include + #include "testutils.h" #include "virerror.h" #include "rpc/virnetdaemon.h" #define VIR_FROM_THIS VIR_FROM_RPC -#if defined(HAVE_SOCKETPAIR) && defined(WITH_YAJL) +#if !defined(WIN32) && defined(WITH_YAJL) struct testClientPriv { int magic; }; diff --git a/tests/virnetserverclienttest.c b/tests/virnetserverclienttest.c index a9a56c48d5..668fd02a1e 100644 --- a/tests/virnetserverclienttest.c +++ b/tests/virnetserverclienttest.c @@ -24,7 +24,7 @@ #define VIR_FROM_THIS VIR_FROM_RPC -#ifdef HAVE_SOCKETPAIR +#ifndef WIN32 static void * testClientNew(virNetServerClientPtr client G_GNUC_UNUSED,