File libfame-intptr.patch of Package libfame

--- src/fame_malloc.c.orig	2006-11-13 00:44:42.000000000 +0100
+++ src/fame_malloc.c	2006-11-13 00:45:24.000000000 +0100
@@ -21,6 +21,7 @@
 #define ALIGN 32
 
 #include <stdlib.h>
+#include <stdint.h>
 
 void* fame_malloc(size_t size)
 {
@@ -36,9 +37,9 @@
    */  
 
   ptr = (unsigned char*) malloc(size+ALIGN);
-  aligned = (unsigned char*) (((unsigned int)ptr & (~(ALIGN-1))) + ALIGN );
+  aligned = (unsigned char*) (((intptr_t)ptr & (~(ALIGN-1))) + ALIGN );
   padding = aligned - 1;
-  *padding = (ALIGN-1) - ((unsigned int)ptr & (ALIGN-1));
+  *padding = (ALIGN-1) - ((intptr_t)ptr & (ALIGN-1));
 
   return ((void*)aligned);
 }
openSUSE Build Service is sponsored by