void-packages/srcpkgs/sysdig/patches/musl-execinfo.patch

42 lines
1.1 KiB
Diff

--- userspace/libsinsp/utils.cpp 2015-11-06 23:42:21.000000000 +0100
+++ userspace/libsinsp/utils.cpp 2015-11-07 17:16:50.225795163 +0100
@@ -21,7 +21,9 @@
#include <limits.h>
#include <stdlib.h>
#include <sys/time.h>
+#if defined(__GLIBC__)
#include <execinfo.h>
+#endif
#include <unistd.h>
#include <sys/time.h>
#include <netdb.h>
@@ -741,7 +743,7 @@
return tv.tv_sec * (uint64_t) 1000000000 + tv.tv_usec * 1000;
}
-#ifndef _WIN32
+#if !defined(_WIN32) && defined(__GLIBC__)
void sinsp_utils::bt(void)
{
static const char start[] = "BACKTRACE ------------";
@@ -763,7 +765,7 @@
free(bt_syms);
}
-#endif // _WIN32
+#endif // !defined(_WIN32) && defined(__GLIBC__)
///////////////////////////////////////////////////////////////////////////////
// gettimeofday() windows implementation
--- userspace/libsinsp/utils.h 2015-11-06 23:42:21.000000000 +0100
+++ userspace/libsinsp/utils.h 2015-11-07 17:17:34.171798332 +0100
@@ -79,7 +79,7 @@
static uint64_t get_current_time_ns();
-#ifndef _WIN32
+#if !defined(_WIN32) && defined(__GLIBC__)
//
// Print the call stack
//