aboutsummaryrefslogtreecommitdiff
path: root/src/common/procmon.c
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2011-05-22 22:54:02 -0700
committerRobert Ransom <rransom.8774@gmail.com>2011-05-22 22:54:02 -0700
commit6cac100b13794b74db8e831bed56df2f0443ea13 (patch)
treed5b11f561e4c774341124763c37c719aa6275d14 /src/common/procmon.c
parentb80a8bba199b9adfb9c893641ba770566fa548e1 (diff)
downloadtor-6cac100b13794b74db8e831bed56df2f0443ea13.tar
tor-6cac100b13794b74db8e831bed56df2f0443ea13.tar.gz
Unbreak the build on libevent 1.x systems
Diffstat (limited to 'src/common/procmon.c')
-rw-r--r--src/common/procmon.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/procmon.c b/src/common/procmon.c
index bd25bc10e..8fcc1afb7 100644
--- a/src/common/procmon.c
+++ b/src/common/procmon.c
@@ -152,7 +152,11 @@ tor_validate_process_specifier(const char *process_spec,
#define PERIODIC_TIMER_FLAGS (0)
#endif
-static const struct timeval poll_interval_tv = {15, 0};
+static struct timeval poll_interval_tv = {15, 0};
+/* Note: If you port this file to plain Libevent 2, you can make
+ * poll_interval_tv const. It has to be non-const here because in
+ * libevent 1.x, event_add expects a pointer to a non-const struct
+ * timeval. */
/** Create a process-termination monitor for the process specifier
* given in <b>process_spec</b>. Return a newly allocated