summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2016-12-18 14:08:11 +0000
committerBryn M. Reeves <bmr@redhat.com>2016-12-18 14:08:11 +0000
commita15f0d181ca2fb44c9c854dfba425d372a8756c6 (patch)
treeda578698426d165207159a8eae4496aaded2eab0
parent3e53adf7c0b83194a74a9fa75a7ebbf1c077de9a (diff)
downloadlvm2-a15f0d181ca2fb44c9c854dfba425d372a8756c6.tar.gz
dmstats: don't declare _start_timestamp if HAVE_SYS_TIMERFD_H
The _start_timestamp is not used by the TIMERFD clock.
-rw-r--r--tools/dmsetup.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index e5ac80acc..3f2c619cb 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -282,13 +282,15 @@ const char *_stats_types[] = {
/* report timekeeping */
static struct dm_timestamp *_cycle_timestamp = NULL;
+#ifndef HAVE_SYS_TIMERFD_H
static struct dm_timestamp *_start_timestamp = NULL;
+#else /* HAVE_SYS_TIMERFD_H */
+static int _timer_fd = -1; /* timerfd file descriptor. */
+#endif /* !HAVE_SYS_TIMERFD_H */
+
static uint64_t _interval = 0; /* configured interval in nsecs */
static uint64_t _new_interval = 0; /* flag top-of-interval */
static uint64_t _last_interval = 0; /* approx. measured interval in nsecs */
-#ifdef HAVE_SYS_TIMERFD_H
-static int _timer_fd = -1; /* timerfd file descriptor. */
-#endif /* HAVE_SYS_TIMERFD_H */
/* Invalid fd value used to signal end-of-reporting. */
#define TIMER_STOPPED -2