diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-02-09 16:07:02 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-02-09 16:07:02 +0000 |
commit | c7315e65ae2940ac514fbd0e0a8e94e13db19cba (patch) | |
tree | 063e8fd6dfddf802a92f7257b9dbe11fe9369f16 | |
parent | f99098cca406369aeff149bd5e70662de934ec08 (diff) | |
download | tor-c7315e65ae2940ac514fbd0e0a8e94e13db19cba.tar tor-c7315e65ae2940ac514fbd0e0a8e94e13db19cba.tar.gz |
Disable KQUEUE from inside Tor if the OSX version is prior to 10.4.0
svn:r18450
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/or/config.c | 15 |
2 files changed, 21 insertions, 1 deletions
@@ -1,4 +1,11 @@ Changes in version 0.2.1.13-????? - 2009-0?-?? + o Minor bugfixes: + - Automatically detect MacOSX versions earlier than 10.4.0, and + disable kqueue from inside Tor when running with these versions. + We previously did this from the startup script, but that was no + help to people who didn't use the startup script. Resolves + bug 863. + o Minor features: - On Linux, use the prctl call to re-enable core dumps when the user is option is set. diff --git a/src/or/config.c b/src/or/config.c index 586245d35..cb624fbd6 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -4735,6 +4735,18 @@ config_parse_interval(const char *s, int *ok) return (int)r; } +/* This is what passes for version detection on OSX. We set + * MACOSX_KQUEUE_IS_BROKEN to true iff we're on a version of OSX before + * 10.4.0 (aka 1040). */ +#ifdef __APPLE__ +#ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ +#define MACOSX_KQUEUE_IS_BROKEN \ + (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1040) +#else +#define MACOSX_KQUEUE_IS_BROKEN 0 +#endif +#endif + /** * Initialize the libevent library. */ @@ -4747,7 +4759,8 @@ init_libevent(void) */ suppress_libevent_log_msg("Function not implemented"); #ifdef __APPLE__ - if (decode_libevent_version(event_get_version(), NULL) < LE_11B) { + if (MACOSX_KQUEUE_IS_BROKEN || + decode_libevent_version(event_get_version(), NULL) < LE_11B) { setenv("EVENT_NOKQUEUE","1",1); } #endif |