diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2005-07-13 00:02:32 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2005-07-13 00:02:32 +0000 |
commit | 9817b68587edb91d0fc8223e373d6cf4d6cc887a (patch) | |
tree | 01eb15843e746ac8a8244313e1e864f434b1961d /multimedia/libfame/files/patch-warnings | |
parent | Fix configure to stop appending ``-march=i386'' to CFLAGS on i386. (diff) |
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).
Notes
Notes:
svn path=/head/; revision=139014
Diffstat (limited to '')
-rw-r--r-- | multimedia/libfame/files/patch-warnings | 23 |
1 files changed, 23 insertions, 0 deletions
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 <stdlib.h> ++#include <stdio.h> ++#include <inttypes.h> + + 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); |