summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
Diffstat (limited to 'devel')
-rw-r--r--devel/gobject-introspection/Makefile3
-rw-r--r--devel/gobject-introspection/files/patch-girepository_giconstantinfo.c33
2 files changed, 35 insertions, 1 deletions
diff --git a/devel/gobject-introspection/Makefile b/devel/gobject-introspection/Makefile
index 68a260fc8..b08b1bf30 100644
--- a/devel/gobject-introspection/Makefile
+++ b/devel/gobject-introspection/Makefile
@@ -3,11 +3,12 @@
# Whom: Alexander Logvinov <avl@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/devel/gobject-introspection/Makefile,v 1.14 2010/07/12 19:28:06 kwm Exp $
+# $MCom: ports/devel/gobject-introspection/Makefile,v 1.15 2010/08/06 03:21:51 avl Exp $
#
PORTNAME= gobject-introspection
PORTVERSION= 0.9.3
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
diff --git a/devel/gobject-introspection/files/patch-girepository_giconstantinfo.c b/devel/gobject-introspection/files/patch-girepository_giconstantinfo.c
new file mode 100644
index 000000000..ab531acde
--- /dev/null
+++ b/devel/gobject-introspection/files/patch-girepository_giconstantinfo.c
@@ -0,0 +1,33 @@
+--- girepository/giconstantinfo.c.orig 2010-09-06 13:15:38.000000000 -0400
++++ girepository/giconstantinfo.c 2010-09-06 13:17:33.000000000 -0400
+@@ -64,6 +64,9 @@ g_constant_info_get_type (GIConstantInfo
+ return _g_type_info_new ((GIBaseInfo*)info, rinfo->typelib, rinfo->offset + 8);
+ }
+
++#define DO_ALIGNED_COPY(dest_addr, src_addr, type) \
++ memcpy((dest_addr), (src_addr), sizeof(type))
++
+ /**
+ * g_constant_info_get_value:
+ * @info: a #GIConstantInfo
+@@ -118,16 +121,16 @@ g_constant_info_get_value (GIConstantInf
+ value->v_uint32 = *(guint32*)&rinfo->typelib->data[blob->offset];
+ break;
+ case GI_TYPE_TAG_INT64:
+- value->v_int64 = *(gint64*)&rinfo->typelib->data[blob->offset];
++ DO_ALIGNED_COPY(&value->v_int64, &rinfo->typelib->data[blob->offset], gint64);
+ break;
+ case GI_TYPE_TAG_UINT64:
+- value->v_uint64 = *(guint64*)&rinfo->typelib->data[blob->offset];
++ DO_ALIGNED_COPY(&value->v_uint64, &rinfo->typelib->data[blob->offset], guint64);
+ break;
+ case GI_TYPE_TAG_FLOAT:
+- value->v_float = *(gfloat*)&rinfo->typelib->data[blob->offset];
++ DO_ALIGNED_COPY(&value->v_float, &rinfo->typelib->data[blob->offset], gfloat);
+ break;
+ case GI_TYPE_TAG_DOUBLE:
+- value->v_double = *(gdouble*)&rinfo->typelib->data[blob->offset];
++ DO_ALIGNED_COPY(&value->v_double, &rinfo->typelib->data[blob->offset], gdouble);
+ break;
+ }
+ }