From: Eric Blake Date: Mon, 29 Jul 2013 19:06:27 +0000 (-0600) Subject: build: fix shunloadtest breakage X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=87c0eab48dea69f8d5309041285d5bfbf6576931;p=libvirt.git build: fix shunloadtest breakage Commit 93ec384 was tested on mingw, but broke the build on Linux: CCLD shunloadtest shunloadtest.o: In function `main': /home/eblake/libvirt/tests/shunloadtest.c:106: undefined reference to `virFilePrintf' ... ssh.o: In function `main': /home/eblake/libvirt/tests/ssh.c:43: undefined reference to `virFilePrintf' /home/eblake/libvirt/tests/ssh.c:49: undefined reference to `virFilePrintf' * tests/testutils.h (fprintf): Provide escape hatch. * tests/shunloadtest.c: Use it. * tests/ssh.c: Likewise. Signed-off-by: Eric Blake --- diff --git a/tests/shunloadtest.c b/tests/shunloadtest.c index 8190e97a75..499b1be5d4 100644 --- a/tests/shunloadtest.c +++ b/tests/shunloadtest.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011, 2013 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -40,6 +40,7 @@ #include +#define NO_LIBVIRT /* This file intentionally does not link to libvirt */ #include "testutils.h" #ifdef linux diff --git a/tests/ssh.c b/tests/ssh.c index 76c60d3133..31bd390db4 100644 --- a/tests/ssh.c +++ b/tests/ssh.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011, 2013 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -22,6 +22,7 @@ #include #include "internal.h" +#define NO_LIBVIRT /* This file intentionally does not link to libvirt */ #include "testutils.h" #ifndef WIN32 diff --git a/tests/testutils.h b/tests/testutils.h index 73c5f884c1..27af5da69c 100644 --- a/tests/testutils.h +++ b/tests/testutils.h @@ -32,8 +32,10 @@ # define EXIT_AM_HARDFAIL 99 /* tell Automake that the framework is broken */ /* Work around lack of gnulib support for fprintf %z */ -# undef fprintf -# define fprintf virFilePrintf +# ifndef NO_LIBVIRT +# undef fprintf +# define fprintf virFilePrintf +# endif extern char *progname; extern char *abs_srcdir;