From 9817b68587edb91d0fc8223e373d6cf4d6cc887a Mon Sep 17 00:00:00 2001 From: Mikhail Teterin Date: Wed, 13 Jul 2005 00:02:32 +0000 Subject: Uh-oh. Fix the just committed patch-cflags to only defined HAVE_BSWAP on i386. Add one more patch to the patch-warnings collection, to ensure warning-free compile on 64-bit platforms (tested on amd64). --- multimedia/libfame/files/patch-warnings | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'multimedia/libfame/files/patch-warnings') diff --git a/multimedia/libfame/files/patch-warnings b/multimedia/libfame/files/patch-warnings index fe734e698110..32ad4ca0773d 100644 --- a/multimedia/libfame/files/patch-warnings +++ b/multimedia/libfame/files/patch-warnings @@ -131,3 +131,26 @@ Include the missing header: - unsigned int weight_left, weight_top, weight_topright; unsigned char *shape; +--- src/fame_malloc.c Fri Jun 20 08:40:30 2003 ++++ src/fame_malloc.c Tue Jul 12 19:59:14 2005 +@@ -22,4 +22,6 @@ + + #include ++#include ++#include + + void* fame_malloc(size_t size) +@@ -37,7 +39,11 @@ + + ptr = (unsigned char*) malloc(size+ALIGN); +- aligned = (unsigned char*) (((unsigned int)ptr & (~(ALIGN-1))) + ALIGN ); ++ if (ptr == NULL) { ++ perror("fame_malloc"); ++ exit(1); ++ } ++ aligned = (unsigned char*) (((uintptr_t)ptr & (~(ALIGN-1))) + ALIGN ); + padding = aligned - 1; +- *padding = (ALIGN-1) - ((unsigned int)ptr & (ALIGN-1)); ++ *padding = (ALIGN-1) - ((uintptr_t)ptr & (ALIGN-1)); + + return ((void*)aligned); -- cgit v1.2.3