summaryrefslogtreecommitdiff
path: root/helpers.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-12-14 23:08:42 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-12-14 23:08:42 +0100
commit2afd826bf6cd19900aee70ae14ede92d91b6f4c0 (patch)
tree9ea95321bf0f54677e6aa4cf856be9bbb452310a /helpers.c
parentbf2e190b8daeb4717726d469fd0ced9f4771000a (diff)
downloadfio-2afd826bf6cd19900aee70ae14ede92d91b6f4c0.tar.gz
fio-2afd826bf6cd19900aee70ae14ede92d91b6f4c0.tar.bz2
Support for Mac OS 10.6.2
Contributed by Small Tree, adopted to newer fio version by me. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'helpers.c')
-rw-r--r--helpers.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/helpers.c b/helpers.c
index f314ebb9..9c76d305 100644
--- a/helpers.c
+++ b/helpers.c
@@ -24,3 +24,16 @@ int __weak inet_aton(const char *cp, struct in_addr *inp)
{
return 0;
}
+
+int __weak clock_gettime(clockid_t clk_id, struct timespec *ts)
+{
+ struct timeval tv;
+ int ret;
+
+ ret = gettimeofday(&tv, NULL);
+
+ ts->ts_sec = tv.tv_sec;
+ ts->ts_nsec = tv.tv_usec * 1000;
+
+ return ret;
+}