Pavel Hrdina (2):
virfirewall: fix build on freebsd
networkxml2firewalltest: fix build failure on freebsd
src/util/virfirewall.c | 4 ++--
tests/networkxml2firewalltest.c | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
--
1.8.3.2
Show replies by date
Freebsd doesn't know ENODATA so we have to use different EINVAL
error code.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed as build breaker.
src/util/virfirewall.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virfirewall.c b/src/util/virfirewall.c
index cee0b1e..bab1634 100644
--- a/src/util/virfirewall.c
+++ b/src/util/virfirewall.c
@@ -307,7 +307,7 @@ virFirewallAddRuleFullV(virFirewallPtr firewall,
VIR_FIREWALL_RETURN_NULL_IF_ERROR(firewall);
if (firewall->ngroups == 0) {
- firewall->err = ENODATA;
+ firewall->err = EINVAL;
return NULL;
}
group = firewall->groups[firewall->currentGroup];
@@ -608,7 +608,7 @@ void virFirewallStartRollback(virFirewallPtr firewall,
VIR_FIREWALL_RETURN_IF_ERROR(firewall);
if (firewall->ngroups == 0) {
- firewall->err = ENODATA;
+ firewall->err = EINVAL;
return;
}
--
1.8.3.2
We need to include the testutils.h also for freebsd.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed as build breaker.
tests/networkxml2firewalltest.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltest.c
index 9255e01..1225c44 100644
--- a/tests/networkxml2firewalltest.c
+++ b/tests/networkxml2firewalltest.c
@@ -21,9 +21,10 @@
#include <config.h>
+#include "testutils.h"
+
#if defined (__linux__)
-# include "testutils.h"
# include "network/bridge_driver_platform.h"
# include "virbuffer.h"
--
1.8.3.2