[experimental-ims] 0caee0a My recent 'discover correct -spersistent mmap address' fix broke 32 bit systems.

Geoff Simmons geoff at varnish-cache.org
Wed Aug 31 16:02:03 CEST 2011


commit 0caee0aa29e8d18cae4e9d66b0cf8b459c056499
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Aug 15 15:01:39 2011 +0000

    My recent 'discover correct -spersistent mmap address' fix broke
    32 bit systems.
    
    Spotted by:	Kristian

diff --git a/bin/varnishd/storage_persistent_mgt.c b/bin/varnishd/storage_persistent_mgt.c
index a22cc59..c4f2191 100644
--- a/bin/varnishd/storage_persistent_mgt.c
+++ b/bin/varnishd/storage_persistent_mgt.c
@@ -164,7 +164,7 @@ smp_mgt_init(struct stevedore *parent, int ac, char * const *av)
 	i = read(sc->fd, &sgn, sizeof sgn);
 	assert(i == sizeof sgn);
 	if (!strcmp(sgn.ident, "SILO"))
-		target = (void*)sgn.mapped;
+		target = (void*)(uintptr_t)sgn.mapped;
 	else
 		target = NULL;
 



More information about the varnish-commit mailing list