From d509a002daa7c0e8f5a953b6668bea145af79979 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Tue, 31 Aug 2010 18:39:11 +0200 Subject: [PATCH] just try to make older util-vserver-pl compile. --- src/planetlab.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/planetlab.c b/src/planetlab.c index 73ccfc3..efbb306 100644 --- a/src/planetlab.c +++ b/src/planetlab.c @@ -99,10 +99,17 @@ tag: if (vc_ctx_create(ctx, 0) == VC_NOCTX) return -1; - if (unshare_flags != 0) { + if (unshare_flags != 0) { unshare(unshare_flags); unshare_flags |= vc_get_space_mask(); +#ifdef VC_VXC_NAMESPACE + /* this is a hack to make util-vserver-pl compile with + util-vserver-0.30.216, which changes the signature for + vc_{set,enter}_namespace functions. */ + vc_set_namespace(ctx, unshare_flags, NULL); +#else vc_set_namespace(ctx, unshare_flags); +#endif } /* Set capabilities - these don't take effect until SETUP flag is unset */ @@ -199,7 +206,14 @@ pl_chcontext(xid_t ctx, uint64_t bcaps, const struct sliver_resources *slr) unshare_flags = get_space_flag(ctx); if (unshare_flags != 0) { unshare_flags |=vc_get_space_mask(); +#ifdef VC_VXC_NAMESPACE + /* this is a hack to make util-vserver-pl compile with + util-vserver-0.30.216, which changes the signature for + vc_{set,enter}_namespace functions. */ + vc_enter_namespace(ctx, unshare_flags, NULL); +#else vc_enter_namespace(ctx, unshare_flags); +#endif } if (!vc_tag_migrate(ctx) && !vc_ctx_migrate(ctx, 0)) -- 2.43.0