void-packages/srcpkgs/duperemove/patches/musl.patch
2016-04-25 08:57:27 +02:00

37 lines
965 B
Diff

--- util.c.orig 2016-04-25 08:52:55.441658244 +0200
+++ util.c 2016-04-25 08:53:56.314297430 +0200
@@ -24,7 +24,9 @@
#include <stdint.h>
#include <ctype.h>
#include <inttypes.h>
+#ifdef __GLIBC__
#include <execinfo.h>
+#endif
#include <sys/time.h>
#include "debug.h"
@@ -125,12 +127,14 @@ void print_stack_trace(void)
char **messages = (char **)NULL;
int i, trace_size = 0;
+#ifdef __GLIBC__
trace_size = backtrace(trace, 16);
messages = backtrace_symbols(trace, trace_size);
printf("[stack trace follows]\n");
for (i=0; i < trace_size; i++)
printf("%s\n", messages[i]);
free(messages);
+#endif
}
void record_start(struct elapsed_time *e, const char *name)
--- util.h.orig 2016-04-25 08:56:23.538843339 +0200
+++ util.h 2016-04-25 08:56:38.194997238 +0200
@@ -2,6 +2,7 @@
#define __UTIL_H__
#include <stdint.h>
+#include <sys/time.h>
/* controlled by user options, turns pretty print on if true. */
extern int human_readable;