summaryrefslogtreecommitdiffstats
path: root/package/ltrace/ltrace-0.5-fix-build-without-USE_DEMANGLE.patch
blob: 180f68834ed0906eaf8db9e6e16ab58b6defcefb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[PATCH] ltrace: fix build when USE_DEMANGLE isn't enabled

summary.c unconditionally calls my_demangle(), which is only available
when USE_DEMANGLE is enabled (which requires libiberty).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 summary.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: ltrace-0.5/summary.c
===================================================================
--- ltrace-0.5.orig/summary.c
+++ ltrace-0.5/summary.c
@@ -83,7 +83,12 @@ void show_summary(void)
 		       (int)entries[i].tv.tv_sec, (int)entries[i].tv.tv_usec,
 		       (unsigned long int)(c / entries[i].count),
 		       entries[i].count,
+#ifdef USE_DEMANGLE
 		       opt_C ? my_demangle(entries[i].name) : entries[i].name);
+#else
+		       entries[i].name);
+#endif
+
 	}
 	printf
 	    ("------ ----------- ----------- --------- --------------------\n");