On BSD family OSes (Free/Net/Open/DragonFlyBSD, Mac OS) and
Solaris loopback interface is called 'lo0' instead of just 'lo'.
virBufferAsprintf(&configbuf, "pid-file=%s\n", pidfile);
/* dnsmasq will *always* listen on localhost unless told otherwise */
+#ifdef __linux__
virBufferAddLit(&configbuf, "except-interface=lo\n");
+#else
+ /* BSD family OSes and Solaris call loopback interface as lo0 */
+ virBufferAddLit(&configbuf, "except-interface=lo0\n");
+#endif
if (dnsmasqCapsGet(caps, DNSMASQ_CAPS_BIND_DYNAMIC)) {
/* using --bind-dynamic with only --interface (no