mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-25 20:25:28 +03:00
116 lines
3.6 KiB
Diff
116 lines
3.6 KiB
Diff
diff --git a/lib/dnscore/src/debug.c b/lib/dnscore/src/debug.c
|
|
index e3b6f8f..c52692a 100644
|
|
--- a/lib/dnscore/src/debug.c
|
|
+++ b/lib/dnscore/src/debug.c
|
|
@@ -52,7 +52,7 @@
|
|
|
|
#include "dnscore/dnscore-config.h"
|
|
|
|
-#if defined(__linux__) || defined(__APPLE__)
|
|
+#if defined(__GLIBC__) || defined(__APPLE__)
|
|
#include <execinfo.h>
|
|
#if HAS_BFD_DEBUG_SUPPORT
|
|
#include <bfd.h>
|
|
@@ -80,7 +80,7 @@
|
|
#undef debug_stat
|
|
#undef debug_mallocated
|
|
|
|
-#if defined(__linux__) || defined(__APPLE__)
|
|
+#if defined(__GLIBC__) || defined(__APPLE__)
|
|
#define ZDB_DEBUG_STACKTRACE 1
|
|
#else /* __FreeBSD__ or unknown */
|
|
#define ZDB_DEBUG_STACKTRACE 0
|
|
@@ -596,7 +596,7 @@ debug_stacktraces_list_set_search(void* data, void* parm)
|
|
stacktrace
|
|
debug_stacktrace_get()
|
|
{
|
|
-#ifdef __linux__
|
|
+#ifdef __GLIBC__
|
|
void* buffer_[1024];
|
|
|
|
int n = backtrace(buffer_, sizeof(buffer_) / sizeof(void*));
|
|
@@ -693,7 +693,7 @@ debug_stacktrace_clear()
|
|
void
|
|
debug_stacktrace_log(logger_handle* handle, u32 level, stacktrace trace)
|
|
{
|
|
-#ifdef __linux__
|
|
+#ifdef __GLIBC__
|
|
int n = 0;
|
|
|
|
if(trace != NULL)
|
|
@@ -753,7 +753,7 @@ debug_stacktrace_log(logger_handle* handle, u32 level, stacktrace trace)
|
|
void
|
|
debug_stacktrace_try_log(logger_handle* handle, u32 level, stacktrace trace)
|
|
{
|
|
-#ifdef __linux__
|
|
+#ifdef __GLIBC__
|
|
int n = 0;
|
|
|
|
if(trace != NULL)
|
|
@@ -819,7 +819,7 @@ debug_stacktrace_print(output_stream *os, stacktrace trace)
|
|
return;
|
|
}
|
|
|
|
-#ifdef __linux__
|
|
+#ifdef __GLIBC__
|
|
int n = 0;
|
|
|
|
while(trace[n] != 0)
|
|
@@ -911,7 +911,7 @@ debug_dump_ex(void* data_pointer_, size_t size_, size_t line_size, bool hex, boo
|
|
|
|
/****************************************************************************/
|
|
|
|
-#if defined(__linux__)
|
|
+#if defined(__GLIBC__)
|
|
|
|
bool
|
|
debug_log_stacktrace(logger_handle *handle, u32 level, const char *prefix)
|
|
@@ -921,7 +921,7 @@ debug_log_stacktrace(logger_handle *handle, u32 level, const char *prefix)
|
|
char binary[PATH_MAX];
|
|
#endif
|
|
|
|
-#if defined(__linux__)
|
|
+#if defined(__GLIBC__)
|
|
|
|
int n = backtrace(addresses, sizeof(addresses) / sizeof(void*));
|
|
|
|
diff --git a/sbin/yadifad/signals.c b/sbin/yadifad/signals.c
|
|
index bc83eaf..a4a5546 100644
|
|
--- a/sbin/yadifad/signals.c
|
|
+++ b/sbin/yadifad/signals.c
|
|
@@ -54,7 +54,7 @@
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
|
|
-#if defined(__linux__) || defined(__gnu_hurd__)
|
|
+#if defined(__GLIBC__) || defined(__gnu_hurd__)
|
|
#define _GNU_SOURCE 1
|
|
#include <execinfo.h>
|
|
#include <sys/mman.h>
|
|
@@ -587,7 +587,7 @@ signal_handler(int signo, siginfo_t* info, void* context)
|
|
log_err(filepath);
|
|
}
|
|
|
|
-#if defined(__linux__) || defined(__gnu_hurd__)
|
|
+#if defined(__GLIBC__) || defined(__gnu_hurd__)
|
|
void* buffer[MAXTRACE];
|
|
char** strings;
|
|
int n = backtrace(buffer, MAXTRACE);
|
|
@@ -617,7 +617,7 @@ signal_handler(int signo, siginfo_t* info, void* context)
|
|
log_err(filepath);
|
|
}
|
|
|
|
-#if __linux__
|
|
+#if __GLIBC__
|
|
ucontext_t* ucontext = (ucontext_t*)context;
|
|
/*
|
|
filepath[0] = '\0';
|
|
@@ -811,7 +811,7 @@ signal_handler(int signo, siginfo_t* info, void* context)
|
|
log_err(filepath);
|
|
}
|
|
|
|
-#if __linux__ && (defined(__x86_64__) || defined(__i386__)) && (_BSD_SOURCE || _SVID_SOURCE || _DEFAULT_SOURCE)
|
|
+#if __GLIBC__ && (defined(__x86_64__) || defined(__i386__)) && (_BSD_SOURCE || _SVID_SOURCE || _DEFAULT_SOURCE)
|
|
// dump more information about the memory address of the error
|
|
#define PAGESIZE 4096
|
|
#define LINESIZE 32
|