This will let us test it.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
#include <unistd.h>
#include <fcntl.h>
#include <unistd.h>
#include <fcntl.h>
#include "harness.h"
#include "internal.h"
#include "harness.h"
#include "internal.h"
*tv= currenttime;
return 0;
}
*tv= currenttime;
return 0;
}
+int Hclock_gettime(clockid_t clk, struct timespec *ts) {
+ Tensuresetup();
+ ts->tv_sec = currenttime.tv_sec;
+ ts->tv_nsec = currenttime.tv_usec * 1000 + 666;
+ switch (clk) {
+ case CLOCK_MONOTONIC: ts->tv_sec -= 1500000000; break;
+ case CLOCK_REALTIME: break;
+ default: Tmust("clock_gettime","clk",0);
+ }
+ return 0;
+}
int Hwritev(int fd, const struct iovec *vector, size_t count) {
size_t i;
int Hwritev(int fd, const struct iovec *vector, size_t count) {
size_t i;
hm_specsyscall(int, writev, `int fd, const struct iovec *vector, size_t count')
hm_specsyscall(int, gettimeofday, `struct timeval *tv, struct timezone *tz')
hm_specsyscall(int, writev, `int fd, const struct iovec *vector, size_t count')
hm_specsyscall(int, gettimeofday, `struct timeval *tv, struct timezone *tz')
+hm_specsyscall(int, clock_gettime, `clockid_t clk, struct timespec *ts')
hm_specsyscall(pid_t, getpid, `void')
hm_specsyscall(int, close, `int fd')
hm_specsyscall(pid_t, getpid, `void')
hm_specsyscall(int, close, `int fd')