mib[4] = NET_RT_IFLIST;
mib[5] = 0; /* no flags */
if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0)
- return;
+ {
+ avahi_log_warn("sysctl failed: %s", strerror(errno));
+ return;
+ }
if ((buf = avahi_malloc(needed)) == NULL)
return;
if (sysctl(mib, 6, buf, &needed, NULL, 0) < 0) {
+ avahi_log_warn("sysctl failed: %s", strerror(errno));
if (errno == ENOMEM && count++ < 10) {
sleep(1);
avahi_free(buf);
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
* Expose AvahiSRecordBrowser over D-BUS and implement in avahi-client [lathiat]
* fix python scripts
* update man pages
-* add some avahi_warn_log in iface-pfroute for the sysctl call [sebest]
-* find why the sysctl call in iface-pfroute fails on FreeBSD "Cannot allocate memory" needs --no-rtlimits to workaround this [sebest]
* portability: implement avahi_exe_name() in avahi-compat-libdns_sd/warn.c on non-linux architectures [sebest]
later: