summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-01-19 04:59:24 +0100
committerSebastian Hahn <sebastian@torproject.org>2010-01-19 05:04:50 +0100
commit4728bd904f2b64fe183a068e5fb1be00ee5e6008 (patch)
treee5c5e85ee9a1ce82c73c9f8e656962dfce47fd67 /src
parenta5e83769b762d9fa09d0600d68ebdbe5c33f6da3 (diff)
downloadtor-4728bd904f2b64fe183a068e5fb1be00ee5e6008.tar.gz
tor-4728bd904f2b64fe183a068e5fb1be00ee5e6008.zip
Fix build on Solaris by disabling support for DisableAllSwap
Fixes bug 1198. Solaris doesn't have RLIMIT_MEMLOCK for get/setrlimit, so disable support because we don't know if all memory can be locked.
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index b221e4e640..d45fda0be3 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -2176,7 +2176,7 @@ tor_threads_init(void)
}
#endif
-#if defined(HAVE_MLOCKALL) && HAVE_DECL_MLOCKALL
+#if defined(HAVE_MLOCKALL) && HAVE_DECL_MLOCKALL && defined(RLIMIT_MEMLOCK)
/** Attempt to raise the current and max rlimit to infinity for our process.
* This only needs to be done once and can probably only be done when we have
* not already dropped privileges.
@@ -2244,7 +2244,7 @@ tor_mlockall(void)
* http://msdn.microsoft.com/en-us/library/aa366895(VS.85).aspx
*/
-#if defined(HAVE_MLOCKALL) && HAVE_DECL_MLOCKALL
+#if defined(HAVE_MLOCKALL) && HAVE_DECL_MLOCKALL && defined(RLIMIT_MEMLOCK)
if (tor_set_max_memlock() == 0) {
/* Perhaps we only want to log this if we're in a verbose mode? */
log_notice(LD_GENERAL, "RLIMIT_MEMLOCK is now set to RLIM_INFINITY.");