]> git.meshlink.io Git - catta/blobdiff - avahi-core/iface-pfroute.c
* fixed a problem on FreeBSD where sysctl needs locked memory
[catta] / avahi-core / iface-pfroute.c
index c573075847e33a3c542f322c4a888bff44c37d20..c3a342d071ad065c1c758a3611dfc15ced429aba 100644 (file)
@@ -321,10 +321,14 @@ void avahi_interface_monitor_sync(AvahiInterfaceMonitor *m) {
   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);