duperemove: unbreak musl builds.

This commit is contained in:
Juan RP 2016-04-25 08:57:27 +02:00
parent cb79b551d7
commit e6257f36ba
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,37 @@
--- 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;

View File

@ -1,7 +1,7 @@
# Template file for 'duperemove'
pkgname=duperemove
version=0.10
revision=1
revision=2
short_desc="Tools for deduping file systems"
maintainer="Enno Boland <gottox@voidlinux.eu>"
hostmakedepends="pkg-config"