提交 87c0eab4 编写于 作者: E Eric Blake

build: fix shunloadtest breakage

Commit 93ec384b 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: NEric Blake <eblake@redhat.com>
上级 6f4458a0
/*
* 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 <config.h>
#define NO_LIBVIRT /* This file intentionally does not link to libvirt */
#include "testutils.h"
#ifdef linux
......
/*
* 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 <stdio.h>
#include "internal.h"
#define NO_LIBVIRT /* This file intentionally does not link to libvirt */
#include "testutils.h"
#ifndef WIN32
......
......@@ -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 */
# ifndef NO_LIBVIRT
# undef fprintf
# define fprintf virFilePrintf
# endif
extern char *progname;
extern char *abs_srcdir;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册