diff options
author | jhb <jhb@FreeBSD.org> | 2003-03-19 02:17:58 +0800 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2003-03-19 02:17:58 +0800 |
commit | a2f821e52341305147002fd13b451be5ecd6293b (patch) | |
tree | 8434de50f308f8601924b91b555968ef0a9eafbe /multimedia | |
parent | e6f3fdafb11e88dacc013db2bbeedc8edf176fb6 (diff) | |
download | freebsd-ports-gnome-a2f821e52341305147002fd13b451be5ecd6293b.tar.gz freebsd-ports-gnome-a2f821e52341305147002fd13b451be5ecd6293b.tar.zst freebsd-ports-gnome-a2f821e52341305147002fd13b451be5ecd6293b.zip |
Add a patch to cast pointers to intptr_t instead of int when performing
arithmetic on a stack address. This fixes arch's such as alpha where
sizeof(int) != sizeof(void *).
Requested by: kris
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/gstreamer/files/patch-libs::ext::cothreads::cothreads::cothreads.c | 17 | ||||
-rw-r--r-- | multimedia/gstreamer80/files/patch-libs::ext::cothreads::cothreads::cothreads.c | 17 |
2 files changed, 26 insertions, 8 deletions
diff --git a/multimedia/gstreamer/files/patch-libs::ext::cothreads::cothreads::cothreads.c b/multimedia/gstreamer/files/patch-libs::ext::cothreads::cothreads::cothreads.c index 5613c9806ce7..e0e229f97524 100644 --- a/multimedia/gstreamer/files/patch-libs::ext::cothreads::cothreads::cothreads.c +++ b/multimedia/gstreamer/files/patch-libs::ext::cothreads::cothreads::cothreads.c @@ -1,10 +1,19 @@ ---- libs/ext/cothreads/cothreads/cothreads.c.orig Thu Nov 14 15:19:11 2002 -+++ libs/ext/cothreads/cothreads/cothreads.c Thu Nov 14 15:20:02 2002 -@@ -21,6 +21,7 @@ +--- libs/ext/cothreads/cothreads/cothreads.c.orig Sat Feb 1 16:09:23 2003 ++++ libs/ext/cothreads/cothreads/cothreads.c Mon Mar 17 13:33:43 2003 +@@ -22,6 +22,7 @@ #include "pth_p.h" /* this pulls in everything */ #include <sys/mman.h> +#include <sys/time.h> #include <sys/resource.h> + #include <stdlib.h> + +@@ -422,7 +423,7 @@ + *stack = malloc (_cothreads_chunk_size * (1.0 + 1.0/_cothreads_count)); + if (!stack) + return FALSE; +- *stack = (void*)((int)*stack &~ (int)(_cothreads_chunk_size / _cothreads_count - 1)); ++ *stack = (void*)((intptr_t)*stack &~ (intptr_t)(_cothreads_chunk_size / _cothreads_count - 1)); + *stack += 1; + #endif - /* older glibc's have MAP_ANON instead of MAP_ANONYMOUS */ diff --git a/multimedia/gstreamer80/files/patch-libs::ext::cothreads::cothreads::cothreads.c b/multimedia/gstreamer80/files/patch-libs::ext::cothreads::cothreads::cothreads.c index 5613c9806ce7..e0e229f97524 100644 --- a/multimedia/gstreamer80/files/patch-libs::ext::cothreads::cothreads::cothreads.c +++ b/multimedia/gstreamer80/files/patch-libs::ext::cothreads::cothreads::cothreads.c @@ -1,10 +1,19 @@ ---- libs/ext/cothreads/cothreads/cothreads.c.orig Thu Nov 14 15:19:11 2002 -+++ libs/ext/cothreads/cothreads/cothreads.c Thu Nov 14 15:20:02 2002 -@@ -21,6 +21,7 @@ +--- libs/ext/cothreads/cothreads/cothreads.c.orig Sat Feb 1 16:09:23 2003 ++++ libs/ext/cothreads/cothreads/cothreads.c Mon Mar 17 13:33:43 2003 +@@ -22,6 +22,7 @@ #include "pth_p.h" /* this pulls in everything */ #include <sys/mman.h> +#include <sys/time.h> #include <sys/resource.h> + #include <stdlib.h> + +@@ -422,7 +423,7 @@ + *stack = malloc (_cothreads_chunk_size * (1.0 + 1.0/_cothreads_count)); + if (!stack) + return FALSE; +- *stack = (void*)((int)*stack &~ (int)(_cothreads_chunk_size / _cothreads_count - 1)); ++ *stack = (void*)((intptr_t)*stack &~ (intptr_t)(_cothreads_chunk_size / _cothreads_count - 1)); + *stack += 1; + #endif - /* older glibc's have MAP_ANON instead of MAP_ANONYMOUS */ |