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

[Libvir] 11/22 Disable iptables if --without-qemu



This disables iptables if configured --without-qemu.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: src/iptables.c
===================================================================
RCS file: /data/cvs/libvirt/src/iptables.c,v
retrieving revision 1.3
diff -u -r1.3 iptables.c
--- src/iptables.c	1 Dec 2007 15:45:25 -0000	1.3
+++ src/iptables.c	7 Dec 2007 10:51:48 -0000
@@ -19,9 +19,9 @@
  *     Mark McLoughlin <markmc redhat com>
  */
 
-#include <config.h>
+#include "config.h"
 
-#include "iptables.h"
+#if WITH_QEMU
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -31,12 +31,19 @@
 #include <limits.h>
 #include <unistd.h>
 #include <fcntl.h>
-#include <paths.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+
+#ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
+#endif
+
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
 
 #include "internal.h"
+#include "iptables.h"
 
 #define qemudLog(level, msg...) fprintf(stderr, msg)
 
@@ -1092,6 +1099,8 @@
     return iptablesForwardMasquerade(ctx, network, physdev, REMOVE);
 }
 
+#endif /* WITH_QEMU */
+
 /*
  * Local variables:
  *  indent-tabs-mode: nil
Index: src/iptables.h
===================================================================
RCS file: /data/cvs/libvirt/src/iptables.h,v
retrieving revision 1.1
diff -u -r1.1 iptables.h
--- src/iptables.h	27 Jun 2007 00:12:29 -0000	1.1
+++ src/iptables.h	7 Dec 2007 10:51:48 -0000
@@ -22,6 +22,8 @@
 #ifndef __QEMUD_IPTABLES_H__
 #define __QEMUD_IPTABLES_H__
 
+#if WITH_QEMU
+
 typedef struct _iptablesContext iptablesContext;
 
 iptablesContext *iptablesContextNew              (void);
@@ -83,6 +85,8 @@
                                                   const char *network,
                                                   const char *physdev);
 
+#endif /* WITH_QEMU */
+
 #endif /* __QEMUD_IPTABLES_H__ */
 
 /*

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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