summaryrefslogtreecommitdiff
path: root/evutil_time.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-08-02 12:35:49 -0400
committerNick Mathewson <nickm@torproject.org>2012-08-02 12:35:49 -0400
commit9be546809a650af937f85ab041df902c66d489e2 (patch)
treec84596b27893437e1ec9979d9e2cbdf5d4301891 /evutil_time.c
parenta64c56470d6ff698b87db1660656d4795d845239 (diff)
downloadlibevent-9be546809a650af937f85ab041df902c66d489e2.tar.gz
Avoid unused-var warning on systems with clock_gettime but without CLOCK_MONOTONIC_COARSE
Diffstat (limited to 'evutil_time.c')
-rw-r--r--evutil_time.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/evutil_time.c b/evutil_time.c
index 7b2043bd..f677dafc 100644
--- a/evutil_time.c
+++ b/evutil_time.c
@@ -177,7 +177,9 @@ evutil_configure_monotonic_time_(struct evutil_monotonic_timer *base,
/* CLOCK_MONOTONIC exists on FreeBSD, Linux, and Solaris. You need to
* check for it at runtime, because some older kernel versions won't
* have it working. */
+#ifdef CLOCK_MONOTONIC_COARSE
const int precise = flags & EV_MONOT_PRECISE;
+#endif
const int fallback = flags & EV_MONOT_FALLBACK;
struct timespec ts;