]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Use the same mlockall checks with tor_set_max_memlock
authorNick Mathewson <nickm@torproject.org>
Fri, 20 Nov 2009 19:45:29 +0000 (14:45 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 20 Nov 2009 19:45:29 +0000 (14:45 -0500)
src/common/compat.c

index 4fc44afac90d5e3117865239a1ab74c16351a976..dbd3197a88eeb7b9430cc9305de8c93116114bc6 100644 (file)
@@ -2204,7 +2204,7 @@ tor_threads_init(void)
 }
 #endif
 
-#ifdef HAVE_SYS_MMAN_H
+#if defined(HAVE_MLOCKALL) && HAVE_DECL_MLOCKALL
 /** 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.