1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

tests: don't mock the time() function on mingw

The mingw header define time() as a static inline function and this
causes a duplicate definition build failure. Since we're not using the
LD_PRELOAD at all on Mingw, we ideally wouldn't compile any of the
mock libraries. Rather than change the build system now though, this
just stubs out the offending function.

Reviewed-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-07-22 17:31:33 +01:00
parent d0c64fc281
commit 5e9d6b3a46

View File

@ -23,6 +23,7 @@
#define VIR_FROM_THIS VIR_FROM_NONE
#ifndef WIN32
time_t time(time_t *t)
{
const time_t ret = 1234567890;
@ -30,3 +31,4 @@ time_t time(time_t *t)
*t = ret;
return ret;
}
#endif