void-packages/srcpkgs/httpdirfs/patches/musl.patch
Nathan Owens c07db08999 New package: httpdirfs-1.2.0
Signed-off-by: Nathan Owens <ndowens04@gmail.com>
2019-12-02 19:55:02 +01:00

33 lines
713 B
Diff

diff --git src/util.c src/util.c
index f2141bd..10e1549 100644
--- src/util.c
+++ src/util.c
@@ -2,8 +2,9 @@
#include <openssl/md5.h>
#include <uuid/uuid.h>
-
+#ifdef __GLIBC__
#include <execinfo.h>
+#endif
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -147,13 +148,15 @@ void exit_failure(void)
{
int nptrs;
void *buffer[BT_BUF_SIZE];
-
+#ifdef __GLIBC__
nptrs = backtrace(buffer, BT_BUF_SIZE);
+#endif
fprintf(stderr, "\nOops! HTTPDirFS crashed! :(\n");
+#ifdef __GLIBC__
fprintf(stderr, "backtrace() returned the following %d addresses:\n",
nptrs);
backtrace_symbols_fd(buffer, nptrs, STDERR_FILENO);
-
+#endif
exit(EXIT_FAILURE);
}