Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-06 05:42:58 +0400
committerFelix Fietkau <nbd@openwrt.org>2013-01-06 05:42:58 +0400
commitaa4f3bde06ea1410f1835590ae025e044f2364fb (patch)
tree03563502534eee8adcaf8a6c0ac88d3244c9d095 /utils.h
parent76f584c7612dc5ac8090da19b50ab159cb5c586a (diff)
uloop: add a clock_gettime() implementation for mac os x
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index a86894a..41f39ec 100644
--- a/utils.h
+++ b/utils.h
@@ -20,6 +20,8 @@
#define __LIBUBOX_UTILS_H
#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
/*
* calloc_a(size_t len, [void **addr, size_t len,...], NULL)
@@ -52,4 +54,13 @@ extern int __BUILD_BUG_ON_CONDITION_FAILED;
#define BUILD_BUG_ON __BUILD_BUG_ON
#endif
+#ifdef __APPLE__
+
+#define CLOCK_REALTIME 0
+#define CLOCK_MONOTONIC 1
+
+void clock_gettime(int type, struct timespec *tv);
+
+#endif
+
#endif