On Mon, Jun 18, 2012 at 03:08:39PM -0600, Eric Blake wrote: > On 06/17/2012 11:18 AM, Guido Günther wrote: > > The word size there is 64 bit not 8. > > --- > > Came across this while browsing the source. O.k. to apply? > > -- Guido > > > > src/openvz/openvz_conf.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c > > index ad4ed74..007f9fe 100644 > > --- a/src/openvz/openvz_conf.c > > +++ b/src/openvz/openvz_conf.c > > @@ -195,7 +195,7 @@ virCapsPtr openvzCapsInit(void) > > if ((guest = virCapabilitiesAddGuest(caps, > > "exe", > > utsname.machine, > > - sizeof(int) == 4 ? 32 : 8, > > + sizeof(int) == 4 ? 32 : 64, > > Do we ever compile openvz on any platform where sizeof(int) = 4? > Shouldn't this really be checking sizeof(long)? Or the actual pointer size? Patch attached. Cheers, -- Guido > > -- > Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 > Libvirt virtualization library http://libvirt.org > > >
>From 832fe1a21fd787993f253608df4b11e9efc169fb Mon Sep 17 00:00:00 2001 Message-Id: <832fe1a21fd787993f253608df4b11e9efc169fb.1340089172.git.agx@xxxxxxxxxxx> From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@xxxxxxxxxxx> Date: Tue, 19 Jun 2012 07:26:31 +0200 Subject: [PATCH] openvz: check pointer size instead of int To: libvir-list@xxxxxxxxxx since int is 4 bytes on both i386 and amd64. --- src/openvz/openvz_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvz/openvz_conf.c b/src/openvz/openvz_conf.c index 007f9fe..2ca92f9 100644 --- a/src/openvz/openvz_conf.c +++ b/src/openvz/openvz_conf.c @@ -195,7 +195,7 @@ virCapsPtr openvzCapsInit(void) if ((guest = virCapabilitiesAddGuest(caps, "exe", utsname.machine, - sizeof(int) == 4 ? 32 : 64, + sizeof(void*) == 4 ? 32 : 64, NULL, NULL, 0, -- 1.7.10.4
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list