From 59c4dea1d1a6cab1580c0be8ff01209812351ae2 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 20 Jul 2020 09:56:15 +0200 Subject: [PATCH] Fix compilation on OpenBSD/amd64 The readline lib on OpenBSD redefines __attribute__ to empty if __STRICT_ANSI__... --- pdns/dnsdist-console.cc | 2 ++ pdns/dnsdist.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pdns/dnsdist-console.cc b/pdns/dnsdist-console.cc index 9b3255db48..d016f880dd 100644 --- a/pdns/dnsdist-console.cc +++ b/pdns/dnsdist-console.cc @@ -25,6 +25,8 @@ #include #if defined (__OpenBSD__) || defined(__NetBSD__) +// If this is not undeffed, __attribute__ wil be redefined by /usr/include/readline/rlstdc.h +#undef __STRICT_ANSI__ #include #include #else diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index b7c3832b26..00526b167a 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -32,6 +32,8 @@ #include #if defined (__OpenBSD__) || defined(__NetBSD__) +// If this is not undeffed, __attribute__ wil be redefined by /usr/include/readline/rlstdc.h +#undef __STRICT_ANSI__ #include #else #include -- 2.47.2