git: 8608e04e8e62 - main - net-p2p/gtk-gnutella: fix build on powerpc*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 27 Oct 2021 11:21:51 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=8608e04e8e62835aabcb71736fa3613335e7e1d3 commit 8608e04e8e62835aabcb71736fa3613335e7e1d3 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2021-10-27 11:19:34 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2021-10-27 11:19:34 +0000 net-p2p/gtk-gnutella: fix build on powerpc* Rename callframe to fix redefinition: memusage.c:538:8: error: redefinition of 'callframe' struct callframe { ^ /usr/include/machine/frame.h:88:8: note: previous definition is here struct callframe { --- .../gtk-gnutella/files/patch-src_lib_memusage.c | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/net-p2p/gtk-gnutella/files/patch-src_lib_memusage.c b/net-p2p/gtk-gnutella/files/patch-src_lib_memusage.c new file mode 100644 index 000000000000..79a5e75e7df3 --- /dev/null +++ b/net-p2p/gtk-gnutella/files/patch-src_lib_memusage.c @@ -0,0 +1,59 @@ +--- src/lib/memusage.c.orig 2021-10-27 02:46:02 UTC ++++ src/lib/memusage.c +@@ -535,25 +535,25 @@ memusage_set_stack_accounting(memusage_t *mu, bool on) + MEMUSAGE_THREAD_UNLOCK(mu); + } + +-struct callframe { ++struct callframes { + size_t calls; + const struct stackatom *frame; + const struct memusage_counter *mc; + }; + + /** +- * qsort() callback for sorting callframe items by decreasing call amount. ++ * qsort() callback for sorting callframes items by decreasing call amount. + */ + static int + callframe_cmp(const void *p1, const void *p2) + { +- const struct callframe *f1 = p1, *f2 = p2; ++ const struct callframes *f1 = p1, *f2 = p2; + + return CMP(f2->calls, f1->calls); /* Decreasing order */ + } + + struct callframe_filler { +- struct callframe *array; ++ struct callframes *array; + size_t capacity; + size_t count; + const memusage_t *mu; +@@ -568,7 +568,7 @@ callframe_filler_add(const void *key, void *value, voi + { + struct callframe_filler *filler = data; + struct memusage_counter *mc = value; +- struct callframe *f; ++ struct callframes *f; + + memusage_counter_check(mc); + g_assert(filler->count < filler->capacity); +@@ -648,7 +648,7 @@ memusage_sort_frames(const memusage_t *mu, bool period + static void + memusage_sorted_frame_dump_log(logagent_t *la, const memusage_t *mu, + const char *name, const char *what, +- struct callframe *array, size_t count, hash_table_t *all, size_t recurses) ++ struct callframes *array, size_t count, hash_table_t *all, size_t recurses) + { + size_t i; + const char *event; +@@ -664,7 +664,7 @@ memusage_sorted_frame_dump_log(logagent_t *la, const m + event = (0 == mu->width) ? "size" : "calls"; + + for (i = 0; i < count; i++) { +- struct callframe *cf = &array[i]; ++ struct callframes *cf = &array[i]; + struct memusage_counter *mc; + size_t total; +