Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 {
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|