[libvirt] [PATCH 0/2] Two patches to fix the build

After 446d09149802677 the build was broken. I've pushed these under build breaker rule. And they're trivial too. Michal Privoznik (2): virmocklibxl.c: Fix include of virfile.h tests: Compile and link virmocklibxl with libxml tests/Makefile.am | 2 +- tests/virmocklibxl.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.16.1

Firstly, this isn't supposed to be in angle brackets because it's not a system header file (not that gcc distinguishes these two, it's just guide for us developers). Secondly, no need to use util/ path prefix because CFLAGS already contain -I$(srcdir)/util. The include is needed because virmocklibxl is mocking virFileMakePath() and even when VIR_MOCK_IMPL_RET_ARGS() does forward declaration to shut up compiler we need real virFileMakePath() declaration so that when it changes compiler catches mismatching declarations. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/virmocklibxl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/virmocklibxl.c b/tests/virmocklibxl.c index 50ae25810f..546c6d6a43 100644 --- a/tests/virmocklibxl.c +++ b/tests/virmocklibxl.c @@ -27,11 +27,12 @@ # include <sys/stat.h> # include <unistd.h> # include <libxl.h> -# include <util/virfile.h> # include <xenstore.h> # include <xenctrl.h> # include <sys/socket.h> +# include "virfile.h" + VIR_MOCK_IMPL_RET_VOID(xs_daemon_open, struct xs_handle *) { -- 2.16.1

Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 8c4b6c2206..7b93fbde69 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -528,7 +528,7 @@ libxlxml2domconfigtest_LDADD = $(libxl_LDADDS) $(LIBXML_LIBS) virmocklibxl_la_SOURCES = \ virmocklibxl.c -virmocklibxl_la_CFLAGS = $(LIBXL_CFLAGS) +virmocklibxl_la_CFLAGS = $(LIBXL_CFLAGS) $(LIBXML_CFLAGS) virmocklibxl_la_LDFLAGS = $(MOCKLIBS_LDFLAGS) virmocklibxl_la_LIBADD = $(MOCKLIBS_LIBS) -- 2.16.1
participants (1)
-
Michal Privoznik