From: Michal Privoznik Date: Thu, 6 Feb 2014 12:54:53 +0000 (+0100) Subject: qemuxml2argvmock: Mock time() on non-linux platforms too X-Git-Tag: v1.2.2-rc1~165 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35b7088534da51583bd130218d0ce3fed7326fa5;p=thirdparty%2Flibvirt.git qemuxml2argvmock: Mock time() on non-linux platforms too The qemuxml2argvtest is run on more platforms than linux. For instance FreeBSD. On these platforms we are, however, not mocking time() which results in current time being fetched from system and hence tests number 32 and 33 failing. Signed-off-by: Michal Privoznik --- diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index ed9fb13e22..bff3b0f15b 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -20,9 +20,8 @@ #include -#ifdef __linux__ -# include "internal.h" -# include +#include "internal.h" +#include time_t time(time_t *t) { @@ -31,7 +30,3 @@ time_t time(time_t *t) *t = ret; return ret; } - -#else -/* Nothing to override on non-__linux__ platforms */ -#endif