commit 77125c6fd60482ed8cb3c6e0679971dcbe9d0646
Author: Andreia Gaita <shana@jitted.com>
Date:   Thu Feb 4 17:04:23 2010 +0000

    os/os_memory_aligned.h: fix memory allocation alignment for 64 bits

diff --git a/src/gallium/auxiliary/os/os_memory_aligned.h b/src/gallium/auxiliary/os/os_memory_aligned.h
index d4528f7..1c1bc6a 100644
--- a/src/gallium/auxiliary/os/os_memory_aligned.h
+++ b/src/gallium/auxiliary/os/os_memory_aligned.h
@@ -51,7 +51,7 @@ os_malloc_aligned(size_t size, uint alignment)
    if (!ptr)
       return NULL;
 
-   buf = (char *)(((uintptr_t)ptr + sizeof(void *) + alignment - 1) & ~(alignment - 1));
+   buf = (char *)(((uintptr_t)ptr + sizeof(void *) + alignment - 1) & ~((long)(alignment - 1)));
    *(char **)(buf - sizeof(void *)) = ptr;
 
    return buf;
