[master] c4462c3 Add an overbroad #ifdef to catch the 32bit userland on 64bit SPARC config we have in Jenkins.

Poul-Henning Kamp phk at FreeBSD.org
Sat May 30 09:29:31 CEST 2015


commit c4462c333fe8d529ac180e56905633c926861039
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sat May 30 07:28:51 2015 +0000

    Add an overbroad #ifdef to catch the 32bit userland on 64bit SPARC
    config we have in Jenkins.

diff --git a/bin/varnishd/common/common.h b/bin/varnishd/common/common.h
index b268082..f487886 100644
--- a/bin/varnishd/common/common.h
+++ b/bin/varnishd/common/common.h
@@ -130,7 +130,12 @@ void VSM_common_ageupdate(const struct vsm_sc *sc);
  * Pointer aligment magic
  */
 
-#define PALGN	    (sizeof(void *) - 1)	/* size of alignment */
+#if defined(__sparc__)
+/* NB: Overbroad test for 32bit userland on 64bit SPARC cpus. */
+#  define PALGN	    (sizeof(double) - 1)	/* size of alignment */
+#else
+#  define PALGN	    (sizeof(void *) - 1)	/* size of alignment */
+#endif
 #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