packages/net/pdns/patches/500-fix-uclibc-pretending-to-be-glibc.patch
James Taylor 41c2f33698 pdns: correct incomplete fix for build failure
Maintainer: me

This commit addresses a build failure around guards on execinfo.h usage to
prevent uclibc from pulling it in, as it defines both  __GLIBC__ and __UCLIBC__.
The original patch had invalid syntax which this corrects.

Signed-off-by: James Taylor <james@jtaylor.id.au>
2019-07-03 11:51:36 -03:00

41 lines
1.3 KiB
Diff

From 7ac0df2a59ddd6e92ede2bca590ec0c76eb67559 Mon Sep 17 00:00:00 2001
From: James Taylor <james@jtaylor.id.au>
Date: Tue, 25 Jun 2019 19:33:04 +1000
Subject: [PATCH] auth: make sure we really are using glibc
Make sure we're using glibc and not uclibc pretending to be glibc
---
pdns/receiver.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pdns/receiver.cc b/pdns/receiver.cc
index e6686787b3..209db7af89 100644
--- a/pdns/receiver.cc
+++ b/pdns/receiver.cc
@@ -354,7 +354,7 @@ static int guardian(int argc, char **argv)
}
}
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
#include <execinfo.h>
static void tbhandler(int num)
{
@@ -386,7 +386,7 @@ int main(int argc, char **argv)
s_programname="pdns";
s_starttime=time(0);
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
signal(SIGSEGV,tbhandler);
signal(SIGFPE,tbhandler);
signal(SIGABRT,tbhandler);
@@ -450,7 +450,7 @@ int main(int argc, char **argv)
// we really need to do work - either standalone or as an instance
-#ifdef __GLIBC__
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
if(!::arg().mustDo("traceback-handler")) {
g_log<<Logger::Warning<<"Disabling traceback handler"<<endl;
signal(SIGSEGV,SIG_DFL);