From cb74a64d630a10818d2ff88ffdeda8a77a3622b8 Mon Sep 17 00:00:00 2001 From: Sebastien Estienne Date: Sun, 13 Nov 2005 17:18:35 +0000 Subject: * fixed a problem on FreeBSD where sysctl needs locked memory git-svn-id: file:///home/lennart/svn/public/avahi/trunk@956 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/iface-pfroute.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'avahi-core') diff --git a/avahi-core/iface-pfroute.c b/avahi-core/iface-pfroute.c index c573075..c3a342d 100644 --- a/avahi-core/iface-pfroute.c +++ b/avahi-core/iface-pfroute.c @@ -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); -- cgit