]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvmock: Mock time() on non-linux platforms too
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 6 Feb 2014 12:54:53 +0000 (13:54 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 6 Feb 2014 14:15:10 +0000 (15:15 +0100)
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 <mprivozn@redhat.com>
tests/qemuxml2argvmock.c

index ed9fb13e22328e875acba79932c86a4fa5229fdb..bff3b0f15baf3bbb87e22ab7a1e5de3da41fd63f 100644 (file)
@@ -20,9 +20,8 @@
 
 #include <config.h>
 
-#ifdef __linux__
-# include "internal.h"
-# include <time.h>
+#include "internal.h"
+#include <time.h>
 
 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