[master] 0c3eaeb Increase alignment to uintmax_t to cater for 32bit userlands on 64bit processors.

Poul-Henning Kamp phk at FreeBSD.org
Sun May 17 12:29:48 CEST 2015


commit 0c3eaeb1a48706af53f283f714e15aaac3ef9ee7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sun May 17 10:29:15 2015 +0000

    Increase alignment to uintmax_t to cater for 32bit userlands on
    64bit processors.

diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index b268082..b7b6c25 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -130,7 +130,7 @@ void VSM_common_ageupdate(const struct vsm_sc *sc);
  * Pointer aligment magic
  */
 
-#define PALGN	    (sizeof(void *) - 1)	/* size of alignment */
+#define PALGN	    (sizeof(uintmax_t) - 1)	/* size of alignment */
 #define PAOK(p)	    (((uintptr_t)(p) & PALGN) == 0)	/* is aligned */
 #define PRNDDN(p)   ((uintptr_t)(p) & ~PALGN)		/* Round down */
 #define PRNDUP(p)   (((uintptr_t)(p) + PALGN) & ~PALGN)	/* Round up */



More information about the varnish-commit mailing list