summaryrefslogtreecommitdiffstats
path: root/main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-04-25 13:03:22 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-04-25 13:03:22 +0000
commitc8147c040199a441753ed99a0be77abe5b2b9400 (patch)
tree7ec0e6fe013455533872386a835cfb7b7fa84632 /main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch
parentb383a752571b61816799129013040ea333961ee0 (diff)
downloadaports-c8147c040199a441753ed99a0be77abe5b2b9400.tar.bz2
aports-c8147c040199a441753ed99a0be77abe5b2b9400.tar.xz
Revert "main/gobject-introspection: upgrade to 1.32.1"
Diffstat (limited to 'main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch')
-rw-r--r--main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch b/main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch
new file mode 100644
index 000000000..368920103
--- /dev/null
+++ b/main/gobject-introspection/0003-Bug-660338-Account-for-padding-in-struct-size-check.patch
@@ -0,0 +1,39 @@
+From e9a83d543e13b422762ed1dd06e6e0d37568f776 Mon Sep 17 00:00:00 2001
+From: Martin Pitt <martin.pitt@ubuntu.com>
+Date: Wed, 28 Sep 2011 08:25:26 +0000
+Subject: [PATCH 3/8] Bug 660338: Account for padding in struct size check
+
+On some platform like armel or powerpc the compiler adds extra padding to
+structs. Make the test_size_of_struct_with_array_of_anon_unions() check more
+liberal by only requiring that the size of the struct is at least as big as
+expected. Also use g_assert_cmpuint() to make it easier to see the actual diff.
+---
+ tests/repository/gitypelibtest.c | 7 ++++---
+ 1 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/tests/repository/gitypelibtest.c b/tests/repository/gitypelibtest.c
+index de821e0..8356d93 100644
+--- a/tests/repository/gitypelibtest.c
++++ b/tests/repository/gitypelibtest.c
+@@ -120,14 +120,15 @@ test_size_of_struct_with_array_of_anon_unions(GIRepository *repo)
+ struct_info = g_irepository_find_by_name (repo, "Regress", "TestStructE");
+ if (!struct_info)
+ g_error ("Could not find Regress.TestStructE");
+- g_assert (g_struct_info_get_size (struct_info)
+- == sizeof (GType) + 2*sizeof (gint64));
++ /* need to use >=, there might be padding */
++ g_assert_cmpuint (g_struct_info_get_size (struct_info),
++ >=, sizeof (GType) + 2*sizeof (gint64));
+ g_base_info_unref (struct_info);
+
+ struct_info = g_irepository_find_by_name (repo, "GObject", "Value");
+ if (!struct_info)
+ g_error ("Could not find GObject.Value");
+- g_assert (g_struct_info_get_size (struct_info) == sizeof (GValue));
++ g_assert_cmpuint (g_struct_info_get_size (struct_info), ==, sizeof (GValue));
+ g_base_info_unref (struct_info);
+ }
+
+--
+1.7.7
+