diff options
author | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-05-28 17:17:34 +0800 |
---|---|---|
committer | kwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059> | 2010-05-28 17:17:34 +0800 |
commit | 9296217301a126b0504ddec05fcd5753e523c646 (patch) | |
tree | 9f164b954e7d20334393e41bf384af3a0a844c74 /devel | |
parent | bc3d4cbea2afa2fb68139477bcfa16c0d6e7dea5 (diff) | |
download | marcuscom-ports-9296217301a126b0504ddec05fcd5753e523c646.tar.gz marcuscom-ports-9296217301a126b0504ddec05fcd5753e523c646.tar.zst marcuscom-ports-9296217301a126b0504ddec05fcd5753e523c646.zip |
Another gvariant fix.
Obtained from: glib git
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@14144 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'devel')
-rw-r--r-- | devel/glib20/Makefile | 4 | ||||
-rw-r--r-- | devel/glib20/files/patch-glib_gvariant-serialiser.c | 25 |
2 files changed, 24 insertions, 5 deletions
diff --git a/devel/glib20/Makefile b/devel/glib20/Makefile index 65f275f03..a934b9c71 100644 --- a/devel/glib20/Makefile +++ b/devel/glib20/Makefile @@ -3,13 +3,13 @@ # Whom: Vanilla I. Shu <vanilla@FreeBSD.org> # # $FreeBSD$ -# $MCom: ports/devel/glib20/Makefile,v 1.166 2010/05/04 09:44:51 kwm Exp $ +# $MCom: ports/devel/glib20/Makefile,v 1.168 2010/05/27 18:34:48 kwm Exp $ # # !! DON'T FORGET ABOUT devel/gio-fam-backend !! PORTNAME= glib PORTVERSION= 2.25.7 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_GNOME:S,%SUBDIR%,sources/glib/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/},} \ ftp://ftp.gtk.org/pub/glib/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}/ \ diff --git a/devel/glib20/files/patch-glib_gvariant-serialiser.c b/devel/glib20/files/patch-glib_gvariant-serialiser.c index fc5dc3d23..311be71a3 100644 --- a/devel/glib20/files/patch-glib_gvariant-serialiser.c +++ b/devel/glib20/files/patch-glib_gvariant-serialiser.c @@ -1,6 +1,15 @@ ---- glib-2.25.7/glib/gvariant-serialiser.c 2010-05-24 18:39:22.000000000 +0200 -+++ glib/gvariant-serialiser.c 2010-05-25 18:10:30.000000000 +0200 -@@ -139,6 +139,24 @@ +--- glib/gvariant-serialiser.c.orig 2010-05-24 18:39:22.000000000 +0200 ++++ glib/gvariant-serialiser.c 2010-05-28 11:03:39.000000000 +0200 +@@ -129,7 +129,7 @@ + g_variant_serialised_check (GVariantSerialised serialised) + { + gsize fixed_size; +- guint alignment; ++ gsize alignment; + + g_assert (serialised.type_info != NULL); + g_variant_type_info_query (serialised.type_info, &alignment, &fixed_size); +@@ -139,6 +139,34 @@ else g_assert (serialised.size == 0 || serialised.data != NULL); @@ -22,6 +31,16 @@ + } + ) - 9; + ++ /* Some OSes (FreeBSD is a known example) have a malloc() that returns ++ * unaligned memory if you request small sizes. 'malloc (1);', for ++ * example, has been seen to return pointers aligned to 6 mod 16. ++ * ++ * Check if this is a small allocation and return without enforcing ++ * the alignment assertion if this is the case. ++ */ ++ if (serialised.size <= alignment) ++ return; ++ g_assert_cmpint (alignment & (gsize) serialised.data, ==, 0); } |