aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-01-21 18:24:10 +0000
committerNick Mathewson <nickm@torproject.org>2013-01-21 18:24:10 +0000
commitdd77b652f236cf41cb585533b6a07a3557062039 (patch)
tree81d2108c0e99b9469b4821717c99d5caa88aa49a /src
parentee421e68d5231e3962b45f8bbfc6505c8e6f3315 (diff)
downloadtor-dd77b652f236cf41cb585533b6a07a3557062039.tar
tor-dd77b652f236cf41cb585533b6a07a3557062039.tar.gz
More of b30d06255c24165 for #6826: fix compat_libevent compilation
It looks like there was a compilation error for 6826 on some platforms. Removing even more now-uncallable code to handle detecting libevent versions before 1.3e. Fixes bug 8012; bug not in any released Tor.
Diffstat (limited to 'src')
-rw-r--r--src/common/compat_libevent.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/common/compat_libevent.c b/src/common/compat_libevent.c
index fc5b0accf..8cbb0db8e 100644
--- a/src/common/compat_libevent.c
+++ b/src/common/compat_libevent.c
@@ -187,13 +187,6 @@ tor_libevent_initialize(tor_libevent_cfg *torcfg)
/* some paths below don't use torcfg, so avoid unused variable warnings */
(void)torcfg;
-#ifdef __APPLE__
- if (MACOSX_KQUEUE_IS_BROKEN ||
- tor_get_libevent_version(NULL) < V_OLD(1,1,'b')) {
- setenv("EVENT_NOKQUEUE","1",1);
- }
-#endif
-
#ifdef HAVE_EVENT2_EVENT_H
{
int attempts = 0;
@@ -411,35 +404,9 @@ void
tor_check_libevent_version(const char *m, int server,
const char **badness_out)
{
- int thread_unsafe = 0;
- const char *v = NULL;
- const char *badness = NULL;
- const char *sad_os = "";
(void) m;
(void) server;
-
- /* Libevent versions before 1.3b do very badly on operating systems with
- * user-space threading implementations. */
-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
- if (server && version < V_OLD(1,3,'b')) {
- thread_unsafe = 1;
- sad_os = "BSD variants";
- }
-#elif defined(__APPLE__) || defined(__darwin__)
- if (server && version < V_OLD(1,3,'b')) {
- thread_unsafe = 1;
- sad_os = "Mac OS X";
- }
-#endif
-
- if (thread_unsafe) {
- log(LOG_WARN, LD_GENERAL,
- "Libevent version %s often crashes when running a Tor server with %s. "
- "Please use the latest version of libevent (1.3b or later)",v,sad_os);
- badness = "BROKEN";
- }
-
- *badness_out = badness;
+ *badness_out = NULL;
}
#if defined(LIBEVENT_VERSION)