]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix compilation on OpenBSD/amd64 9346/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 20 Jul 2020 07:56:15 +0000 (09:56 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 21 Jul 2020 11:24:25 +0000 (13:24 +0200)
The readline lib on OpenBSD redefines __attribute__ to empty if __STRICT_ANSI__...

pdns/dnsdist-console.cc
pdns/dnsdist.cc

index 9b3255db48eb116430412153c966619f86ef0e54..d016f880dda30c845e6a1df09fdd854de04562df 100644 (file)
@@ -25,6 +25,8 @@
 #include <thread>
 
 #if defined (__OpenBSD__) || defined(__NetBSD__)
+// If this is not undeffed, __attribute__ wil be redefined by /usr/include/readline/rlstdc.h
+#undef __STRICT_ANSI__
 #include <readline/readline.h>
 #include <readline/history.h>
 #else
index b7c3832b2613f86e2bc7ab1db75d046e80a8e9d1..00526b167a34a7261e9e9db135e0209b85a2a4cc 100644 (file)
@@ -32,6 +32,8 @@
 #include <unistd.h>
 
 #if defined (__OpenBSD__) || defined(__NetBSD__)
+// If this is not undeffed, __attribute__ wil be redefined by /usr/include/readline/rlstdc.h
+#undef __STRICT_ANSI__
 #include <readline/readline.h>
 #else
 #include <editline/readline.h>