summaryrefslogtreecommitdiffstats
path: root/devel/glib20
diff options
context:
space:
mode:
Diffstat (limited to 'devel/glib20')
-rw-r--r--devel/glib20/Makefile4
-rw-r--r--devel/glib20/files/patch-glib_gvariant-serialiser.c25
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);
}