summaryrefslogtreecommitdiff
path: root/test/sbuild
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@debian.org>2013-05-04 18:12:20 +0100
committerRoger Leigh <rleigh@debian.org>2013-05-04 18:37:01 +0100
commitbc2873b202a2de189055e20c6f16d0e3944463ce (patch)
treef8b3780e8975fc98b1140cd1d23e795aa6eb4b14 /test/sbuild
parentafb9b7350d4106e981267c4cb577fbd70406ba5e (diff)
downloadschroot-bc2873b202a2de189055e20c6f16d0e3944463ce.tar.gz
build: personality support is not built if not available
Diffstat (limited to 'test/sbuild')
-rw-r--r--test/sbuild/chroot/chroot.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/sbuild/chroot/chroot.h b/test/sbuild/chroot/chroot.h
index 370bdb35..284c6a63 100644
--- a/test/sbuild/chroot/chroot.h
+++ b/test/sbuild/chroot/chroot.h
@@ -21,7 +21,9 @@
#include <sbuild/config.h>
#include <sbuild/chroot/chroot.h>
+#ifdef SBUILD_FEATURE_PERSONALITY
#include <sbuild/chroot/facet/personality.h>
+#endif // SBUILD_FEATURE_PERSONALITY
#include <sbuild/chroot/facet/session.h>
#include <sbuild/chroot/facet/session-clonable.h>
#include <sbuild/chroot/facet/source.h>
@@ -205,10 +207,12 @@ public:
chroot->set_preserve_environment(false);
chroot->set_default_shell("/bin/testshell");
+#ifdef SBUILD_FEATURE_PERSONALITY
sbuild::chroot::facet::personality::ptr pfac
(chroot->get_facet<sbuild::chroot::facet::personality>());
if (pfac)
pfac->set_persona(sbuild::personality("undefined"));
+#endif // SBUILD_FEATURE_PERSONALITY
sbuild::chroot::facet::source_clonable::ptr usrc
(chroot->get_facet<sbuild::chroot::facet::source_clonable>());