faketime: work around declaration conflict of gettimeofday
#endif
#include <time.h>
-#include <sys/time.h>
#include <dlfcn.h>
+#if 0
+/* we cannot include sys/time.h due to gettimeofday definition being
+ * different on some platforms with complex/incompatible restrict
+ * definitions, but we do need struct timeval, so we're faking the
+ * necessary bits here */
+#include <sys/time.h>
+#else
+/* internal definition, we only access tv_sec so don't care about the
+ * type/definition of tv_usec */
+struct timeval {
+ time_t tv_sec;
+};
+#endif
/* for repeatability, always return time starting from 1981-02-01 from the
* first call to time(). This way we can control the aggregator time
