]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Unbreak the build on libevent 1.x systems
authorRobert Ransom <rransom.8774@gmail.com>
Mon, 23 May 2011 05:54:02 +0000 (22:54 -0700)
committerRobert Ransom <rransom.8774@gmail.com>
Mon, 23 May 2011 05:54:02 +0000 (22:54 -0700)
src/common/procmon.c

index bd25bc10e3b5ee04489951cc10cd471a24f05045..8fcc1afb7c33d8f7db8e2d91425dcbdd07da98ee 100644 (file)
@@ -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