• E
    build: skip ld_preload tests on non-Linux systems · caf65892
    Eric Blake 提交于
    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: NEric Blake <eblake@redhat.com>
    caf65892
virsystemdtest.c 6.2 KB