[PATCH] Avoid compile failure when HAVE_AVAHI is not defined.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this patch, building without HAVE_AVAHI fails due to an unguarded
use of mdns_name.  Rather than adding yet another #ifdef..#endif (ugly
and less maintainable), I've chosen to un-ifdef the declarations and
a few uses.  The more code that we compile and use unconditionally,
the fewer surprises we'll encounter down the road.

Mon Dec  3 14:24:20 CET 2007 Jim Meyering <meyering@xxxxxxxxxx>

	Avoid compile failure when HAVE_AVAHI is not defined.
	* qemud/qemud.c (remoteReadConfigFile): Remove some of the
	"#ifdef HAVE_AVAHI" guards around uses of mdns_name and mdns_adv.

diff --git a/qemud/qemud.c b/qemud/qemud.c
index 9904e4a..f88ed42 100644
--- a/qemud/qemud.c
+++ b/qemud/qemud.c
@@ -77,10 +77,8 @@ static gid_t unix_sock_gid = 0; /* Only root by default */
 static int unix_sock_rw_mask = 0700; /* Allow user only */
 static int unix_sock_ro_mask = 0777; /* Allow world */

-#ifdef HAVE_AVAHI
 static int mdns_adv = 1;
 static char *mdns_name = NULL;
-#endif

 static int tls_no_verify_certificate = 0;
 static int tls_no_verify_address = 0;
@@ -1696,10 +1694,8 @@ remoteReadConfigFile (const char *filename)
         unix_sock_rw_perms = NULL;
     }

-#ifdef HAVE_AVAHI
     GET_CONF_INT (conf, filename, mdns_adv);
     GET_CONF_STR (conf, filename, mdns_name);
-#endif

     GET_CONF_INT (conf, filename, tls_no_verify_certificate);
     GET_CONF_INT (conf, filename, tls_no_verify_address);
--
1.5.3.7.949.g2221a6

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]