]> git.ipfire.org Git - thirdparty/libvirt.git/commit
build: skip ld_preload tests on non-Linux systems
authorEric Blake <eblake@redhat.com>
Tue, 17 Sep 2013 17:11:25 +0000 (11:11 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 17 Sep 2013 17:11:25 +0000 (11:11 -0600)
commitcaf6589233201ef302503c0ed802fc216593cdbe
tree4f6ac91acfb96cb987ac1f6e9e3333ebff8ce71e
parent0e1f012c1d06caacd24cb6a009dbecc8b532bbd3
build: skip ld_preload tests on non-Linux systems

A cross build to mingw fails with:

  CC       virsystemdtest-virsystemdtest.o
../../tests/virsystemdtest.c: In function 'testCreateNoSystemd':
../../tests/virsystemdtest.c:97:9: error: implicit declaration of function 'unsetenv' [-Werror=implicit-function-declaration]
         unsetenv("FAIL_NO_SERVICE");
         ^
../../tests/virsystemdtest.c:97:9: error: nested extern declaration of 'unsetenv' [-Werror=nested-externs]

We could cop out and pull in the gnulib unsetenv module.  But when
you stop and think about it, this test requires LD_PRELOAD to work,
and systemd is a Linux-only concept anyways, both of which mean
the test could never work on mingw in the first place.  Simpler is
to just fix the test to behave like our other LD_PRELOAD tests.

* tests/virsystemdtest.c: Provide non-Linux implementation.

Signed-off-by: Eric Blake <eblake@redhat.com>
tests/virsystemdtest.c