]> git.meshlink.io Git - catta/blobdiff - avahi-daemon/main.c
don't use deprecated API in Mono.Unix
[catta] / avahi-daemon / main.c
index 821820ee9baa62ada2646cdb0fdfd2573ed9414e..da198686b6c289db6f605e494e9d4550133d88f5 100644 (file)
@@ -487,10 +487,6 @@ static int load_config_file(DaemonConfig *c) {
                     c->server_config.use_iff_running = is_yes(p->value);
                 else if (strcasecmp(p->key, "disallow-other-stacks") == 0)
                     c->server_config.disallow_other_stacks = is_yes(p->value);
-                else if (strcasecmp(p->key, "disable-publishing") == 0)
-                    c->server_config.disable_publishing = is_yes(p->value);
-                else if (strcasecmp(p->key, "disable-user-service-publishing") == 0)
-                    c->disable_user_service_publishing = is_yes(p->value);
 #ifdef HAVE_DBUS
                 else if (strcasecmp(p->key, "enable-dbus") == 0) {
 
@@ -526,6 +522,10 @@ static int load_config_file(DaemonConfig *c) {
                     c->server_config.publish_domain = is_yes(p->value);
                 else if (strcasecmp(p->key, "publish-resolv-conf-dns-servers") == 0)
                     c->publish_resolv_conf = is_yes(p->value);
+                else if (strcasecmp(p->key, "disable-publishing") == 0)
+                    c->server_config.disable_publishing = is_yes(p->value);
+                else if (strcasecmp(p->key, "disable-user-service-publishing") == 0)
+                    c->disable_user_service_publishing = is_yes(p->value);
                 else if (strcasecmp(p->key, "add-service-cookie") == 0)
                     c->server_config.add_service_cookie = is_yes(p->value);
                 else if (strcasecmp(p->key, "publish-dns-servers") == 0) {
@@ -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