render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
edecca
From 5b3cf2163da13ac79129ca2bb85ae1908922644c Mon Sep 17 00:00:00 2001
edecca
Message-Id: <5b3cf2163da13ac79129ca2bb85ae1908922644c@dist-git>
edecca
From: Laine Stump <laine@laine.org>
edecca
Date: Fri, 1 Feb 2019 20:29:27 -0500
edecca
Subject: [PATCH] configure: change HAVE_FIREWALLD to WITH_FIREWALLD
edecca
MIME-Version: 1.0
edecca
Content-Type: text/plain; charset=UTF-8
edecca
Content-Transfer-Encoding: 8bit
edecca
edecca
Support for firewalld is a feature that can be selectively enabled or
edecca
disabled (using --with-firewalld/--without-firewalld), not merely
edecca
something that must be accounted for in the code if it is present with
edecca
no exceptions. It is more consistent with other usage in libvirt to
edecca
use WITH_FIREWALLD rather than HAVE_FIREWALLD.
edecca
edecca
Signed-off-by: Laine Stump <laine@laine.org>
edecca
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
edecca
(cherry picked from commit 4bf0f390ed57307050a213f3f6364061f2717b00)
edecca
edecca
https://bugzilla.redhat.com/1650320
edecca
edecca
Reviewed-by: Ján Tomko <jtomko@redhat.com>
edecca
---
edecca
 m4/virt-firewalld.m4           | 4 ++--
edecca
 src/network/bridge_driver.c    | 6 +++---
edecca
 src/nwfilter/nwfilter_driver.c | 6 +++---
edecca
 3 files changed, 8 insertions(+), 8 deletions(-)
edecca
edecca
diff --git a/m4/virt-firewalld.m4 b/m4/virt-firewalld.m4
edecca
index 08d2ff83d6..89efa47589 100644
edecca
--- a/m4/virt-firewalld.m4
edecca
+++ b/m4/virt-firewalld.m4
edecca
@@ -32,10 +32,10 @@ AC_DEFUN([LIBVIRT_CHECK_FIREWALLD], [
edecca
     if test "x$with_dbus" != "xyes" ; then
edecca
       AC_MSG_ERROR([You must have dbus enabled for firewalld support])
edecca
     fi
edecca
-    AC_DEFINE_UNQUOTED([HAVE_FIREWALLD], [1], [whether firewalld support is enabled])
edecca
+    AC_DEFINE_UNQUOTED([WITH_FIREWALLD], [1], [whether firewalld support is enabled])
edecca
   fi
edecca
 
edecca
-  AM_CONDITIONAL([HAVE_FIREWALLD], [test "x$with_firewalld" != "xno"])
edecca
+  AM_CONDITIONAL([WITH_FIREWALLD], [test "x$with_firewalld" != "xno"])
edecca
 ])
edecca
 
edecca
 AC_DEFUN([LIBVIRT_RESULT_FIREWALLD], [
edecca
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
edecca
index 1ad95d524c..d153a8cdb6 100644
edecca
--- a/src/network/bridge_driver.c
edecca
+++ b/src/network/bridge_driver.c
edecca
@@ -538,7 +538,7 @@ networkAutostartConfig(virNetworkObjPtr obj,
edecca
 }
edecca
 
edecca
 
edecca
-#if HAVE_FIREWALLD
edecca
+#ifdef WITH_FIREWALLD
edecca
 static DBusHandlerResult
edecca
 firewalld_dbus_filter_bridge(DBusConnection *connection ATTRIBUTE_UNUSED,
edecca
                              DBusMessage *message,
edecca
@@ -659,7 +659,7 @@ networkStateInitialize(bool privileged,
edecca
     int ret = -1;
edecca
     char *configdir = NULL;
edecca
     char *rundir = NULL;
edecca
-#ifdef HAVE_FIREWALLD
edecca
+#ifdef WITH_FIREWALLD
edecca
     DBusConnection *sysbus = NULL;
edecca
 #endif
edecca
 
edecca
@@ -757,7 +757,7 @@ networkStateInitialize(bool privileged,
edecca
 
edecca
     network_driver->networkEventState = virObjectEventStateNew();
edecca
 
edecca
-#ifdef HAVE_FIREWALLD
edecca
+#ifdef WITH_FIREWALLD
edecca
     if (!(sysbus = virDBusGetSystemBus())) {
edecca
         VIR_WARN("DBus not available, disabling firewalld support "
edecca
                  "in bridge_network_driver: %s", virGetLastErrorMessage());
edecca
diff --git a/src/nwfilter/nwfilter_driver.c b/src/nwfilter/nwfilter_driver.c
edecca
index ed34586105..a657b750e6 100644
edecca
--- a/src/nwfilter/nwfilter_driver.c
edecca
+++ b/src/nwfilter/nwfilter_driver.c
edecca
@@ -79,7 +79,7 @@ static void nwfilterDriverUnlock(void)
edecca
     virMutexUnlock(&driver->lock);
edecca
 }
edecca
 
edecca
-#if HAVE_FIREWALLD
edecca
+#ifdef WITH_FIREWALLD
edecca
 
edecca
 static DBusHandlerResult
edecca
 nwfilterFirewalldDBusFilter(DBusConnection *connection ATTRIBUTE_UNUSED,
edecca
@@ -148,7 +148,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus)
edecca
     return ret;
edecca
 }
edecca
 
edecca
-#else /* HAVE_FIREWALLD */
edecca
+#else /* WITH_FIREWALLD */
edecca
 
edecca
 static void
edecca
 nwfilterDriverRemoveDBusMatches(void)
edecca
@@ -161,7 +161,7 @@ nwfilterDriverInstallDBusMatches(DBusConnection *sysbus ATTRIBUTE_UNUSED)
edecca
     return 0;
edecca
 }
edecca
 
edecca
-#endif /* HAVE_FIREWALLD */
edecca
+#endif /* WITH_FIREWALLD */
edecca
 
edecca
 static int
edecca
 virNWFilterTriggerRebuildImpl(void *opaque)
edecca
-- 
edecca
2.20.1
edecca