Группа :: Development/Tools
Пакет: spdk
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: spdk-23.05-alpinelinux-backtrace.patch
Скачать
Скачать
--- a/lib/thread/thread.c
+++ b/lib/thread/thread.c
@@ -25,8 +25,11 @@
#ifdef __linux__
#include <sys/timerfd.h>
#include <sys/eventfd.h>
+#include <features.h>
+#ifdef __GLIBC__
#include <execinfo.h>
#endif
+#endif
#ifdef __FreeBSD__
#include <execinfo.h>
@@ -2952,11 +2955,16 @@
char **stack;
size_t i;
+ #if defined(__linux__) && !defined(__GLIBC__)
+ SPDK_ERRLOG("musl does not provide the backtrace_symbols function needed for stack of %s\n", title);
+ return;
+ #else
stack = backtrace_symbols(sspin_stack->addrs, sspin_stack->depth);
if (stack == NULL) {
SPDK_ERRLOG("Out of memory while allocate stack for %s\n", title);
return;
}
+ #endif
SPDK_ERRLOG(" %s:\n", title);
for (i = 0; i < sspin_stack->depth; i++) {
/*
--- a/module/bdev/ocf/ctx.c
+++ b/module/bdev/ocf/ctx.c
@@ -4,7 +4,10 @@
*/
#include <ocf/ocf.h>
+#include <features.h>
+#if defined(__linux__) && defined(__GLIBC__)
#include <execinfo.h>
+#endif
#include "spdk/env.h"
#include "spdk/log.h"