mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Compilation fixes for MinGW
This commit is contained in:
@@ -36,7 +36,6 @@ EXTRA_DIST = \
|
||||
oomtrace.pl \
|
||||
test-lib.sh \
|
||||
xmlrpcserver.py \
|
||||
test_conf.sh \
|
||||
qemuxml2argvdata \
|
||||
nodeinfodata
|
||||
|
||||
@@ -44,16 +43,20 @@ noinst_PROGRAMS = xmlrpctest xml2sexprtest sexpr2xmltest virshtest conftest \
|
||||
reconnect xmconfigtest xencapstest qemuxml2argvtest qemuxml2xmltest \
|
||||
nodeinfotest statstest qparamtest
|
||||
|
||||
test_scripts = \
|
||||
test_scripts =
|
||||
if WITH_LIBVIRTD
|
||||
test_scripts += \
|
||||
test_conf.sh \
|
||||
daemon-conf \
|
||||
int-overflow \
|
||||
read-bufsiz \
|
||||
read-non-seekable \
|
||||
vcpupin
|
||||
endif
|
||||
|
||||
EXTRA_DIST += $(test_scripts)
|
||||
|
||||
TESTS = xml2sexprtest sexpr2xmltest virshtest test_conf.sh xmconfigtest \
|
||||
TESTS = xml2sexprtest sexpr2xmltest virshtest xmconfigtest \
|
||||
xencapstest qemuxml2argvtest qemuxml2xmltest nodeinfotest \
|
||||
statstest qparamtest $(test_scripts)
|
||||
if ENABLE_XEN_TESTS
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifndef WIN32
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
@@ -139,6 +141,7 @@ int virtTestLoadFile(const char *name,
|
||||
return st.st_size;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
static
|
||||
void virtTestCaptureProgramExecChild(const char *const argv[],
|
||||
int pipefd) {
|
||||
@@ -181,7 +184,6 @@ void virtTestCaptureProgramExecChild(const char *const argv[],
|
||||
close(stderrfd);
|
||||
}
|
||||
|
||||
|
||||
int virtTestCaptureProgramOutput(const char *const argv[],
|
||||
char **buf,
|
||||
int buflen) {
|
||||
@@ -227,6 +229,7 @@ int virtTestCaptureProgramOutput(const char *const argv[],
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* !WIN32 */
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <config.h>
|
||||
|
||||
#ifdef WITH_QEMU
|
||||
#include <sys/utsname.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@@ -70,3 +70,4 @@ cleanup:
|
||||
virCapabilitiesFree(caps);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -270,7 +270,7 @@ static int testCompareDomstateByName(const void *data ATTRIBUTE_UNUSED) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
static int
|
||||
mymain(int argc, char **argv)
|
||||
{
|
||||
@@ -358,5 +358,10 @@ mymain(int argc, char **argv)
|
||||
|
||||
return(ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
|
||||
}
|
||||
#else /* ! WIN32 */
|
||||
|
||||
static int mymain (void) { exit (77); /* means 'test skipped' for automake */ }
|
||||
|
||||
#endif /* WIN32 */
|
||||
|
||||
VIRT_TEST_MAIN(mymain)
|
||||
|
||||
Reference in New Issue
Block a user