summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorygj6 <82787816@qq.com>2019-08-14 19:47:45 +0800
committerygj6 <82787816@qq.com>2019-08-14 19:47:45 +0800
commit759573c9e17b0397aa1c6d2616c743551b8ca78d (patch)
tree7e8d424f7ed461d5fd3cd720631d8067b373c324 /sample
parent80009c50e569e6eb74f188046d5ad51abce0749b (diff)
downloadlibevent-759573c9e17b0397aa1c6d2616c743551b8ca78d.tar.gz
sample: fix 'INFINITY' undeclared error
Diffstat (limited to 'sample')
-rw-r--r--sample/watch-timing.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sample/watch-timing.c b/sample/watch-timing.c
index 9babd32b..a6c1d264 100644
--- a/sample/watch-timing.c
+++ b/sample/watch-timing.c
@@ -11,6 +11,10 @@
#include <event2/util.h>
#include <event2/watch.h>
+#if !defined(INFINITY)
+#define INFINITY (1.0/0.0)
+#endif
+
/**
An approximate histogram in constant space, based on Ben-Haim & Yom-Tov, "A
Streaming Parallel Decision Tree Algorithm" [1] and a previous implementation