From: Martin Kletzander Date: Fri, 3 Feb 2012 15:03:18 +0000 (+0100) Subject: Fixed connection definition for non-SELinux builds X-Git-Tag: v0.9.10-rc1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32f881c6c42f94da70a3782fe20a058fe3dc39cc;p=thirdparty%2Flibvirt.git Fixed connection definition for non-SELinux builds 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. --- diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index d1156e479a..1c148e29ab 100644 --- a/src/lxc/lxc_container.c +++ b/src/lxc/lxc_container.c @@ -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); diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index fedb7c8c43..8f336f5d23 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -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");