]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Fixed connection definition for non-SELinux builds
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 3 Feb 2012 15:03:18 +0000 (16:03 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 3 Feb 2012 15:13:45 +0000 (16:13 +0100)
This patch fixes the access of variable "con" in two files where the
variable was declared only on SELinux builds and thus the build failed
without SELinux. It's a rather nasty fix but helps fix the build
quickly and without any major changes to the code.

src/lxc/lxc_container.c
src/lxc/lxc_controller.c

index d1156e479a369512245bd6752c16e1111c6ad48b..1c148e29ab1647fe253fb31dbc5d2a03df5ce99c 100644 (file)
@@ -449,6 +449,8 @@ static int lxcContainerMountBasicFS(const char *srcprefix, bool pivotRoot)
     char *opts = NULL;
 #if HAVE_SELINUX
     security_context_t con;
+#else
+    bool con = false;
 #endif
 
     VIR_DEBUG("Mounting basic filesystems %s pivotRoot=%d", NULLSTR(srcprefix), pivotRoot);
index fedb7c8c4308ae3bfe25aa26543655c7c7af5b91..8f336f5d236d32e68c25324457ad24052b52fa2c 100644 (file)
@@ -1438,6 +1438,8 @@ lxcControllerRun(virDomainDefPtr def,
     if (root) {
 #if HAVE_SELINUX
         security_context_t con;
+#else
+        bool con = false;
 #endif
         char *opts;
         VIR_DEBUG("Setting up private /dev/pts");