]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/main.c
* fixed a problem on FreeBSD where sysctl needs locked memory
[catta] / avahi-daemon / main.c
index 821820ee9baa62ada2646cdb0fdfd2573ed9414e..12af74c32ef5615ce6aa25364c7f98e15380f0e7 100644 (file)
@@ -971,7 +971,8 @@ static void enforce_rlimits(void) {
         set_one_rlimit(RLIMIT_NPROC, config.rlimit_nproc, "RLIMIT_NPROC");
 #endif
 
-#ifdef RLIMIT_MEMLOCK
+    /* the sysctl() call from iface-pfroute.c needs locked memory on FreeBSD */
+#if defined(RLIMIT_MEMLOCK) && !defined(__FreeBSD__)
     /* We don't need locked memory */
     set_one_rlimit(RLIMIT_MEMLOCK, 0, "RLIMIT_MEMLOCK");
 #endif