From 05893c956289431430d0775e2ef335783ffcd291 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sat, 7 Mar 2020 16:16:16 +0100 Subject: [PATCH] Fix the build on 32 bit hosts --- 24.patch | 29 +++++++++++++++++++++++++++++ sysprof.spec | 3 +++ 2 files changed, 32 insertions(+) create mode 100644 24.patch diff --git a/24.patch b/24.patch new file mode 100644 index 0000000..450de96 --- /dev/null +++ b/24.patch @@ -0,0 +1,29 @@ +From 5dea152c7728f5a37370ad8a229115833e36b4f6 Mon Sep 17 00:00:00 2001 +From: Rasmus Thomsen +Date: Sat, 7 Mar 2020 10:44:16 +0100 +Subject: [PATCH] tests: use G_GSIZE_FORMAT instead of G_GUINT64_FORMAT for + gsize + +This fixes the build on 32-bit platforms with -Werror-format + +fixes #32 +--- + src/tests/allocs-by-size.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/tests/allocs-by-size.c b/src/tests/allocs-by-size.c +index 666113a..6260d4b 100644 +--- a/src/tests/allocs-by-size.c ++++ b/src/tests/allocs-by-size.c +@@ -109,7 +109,7 @@ allocs_by_size (SysprofCaptureReader *reader) + { + const Item *item = &g_array_index (ar, Item, i); + +- g_print ("%"G_GUINT64_FORMAT",%"G_GUINT64_FORMAT",%"G_GUINT64_FORMAT"\n", ++ g_print ("%"G_GSIZE_FORMAT",%"G_GSIZE_FORMAT",%"G_GSIZE_FORMAT"\n", + item->size, item->cmp, item->count); + } + } +-- +2.24.1 + diff --git a/sysprof.spec b/sysprof.spec index 4e67f06..5ea6aee 100644 --- a/sysprof.spec +++ b/sysprof.spec @@ -8,6 +8,9 @@ Summary: A system-wide Linux profiler License: GPLv3+ URL: http://www.sysprof.com Source0: https://download.gnome.org/sources/sysprof/3.36/sysprof-%{version}.tar.xz +# Fix the build on 32 bit hosts +# https://gitlab.gnome.org/GNOME/sysprof/-/merge_requests/24 +Patch0: 24.patch BuildRequires: gcc BuildRequires: gcc-c++