From: W.C.A. Wijngaards Date: Wed, 29 May 2019 11:28:03 +0000 (+0200) Subject: - Fix to guard _OPENBSD_SOURCE from redefinition. X-Git-Tag: release-1.9.2rc1~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a4f4d7b6ba3d56f8d3277bfe5c4cb2808fd4f8d9;p=thirdparty%2Funbound.git - Fix to guard _OPENBSD_SOURCE from redefinition. --- diff --git a/config.h.in b/config.h.in index e8795c7ef..e2d3116cc 100644 --- a/config.h.in +++ b/config.h.in @@ -972,6 +972,10 @@ +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif + #ifndef UNBOUND_DEBUG # ifndef NDEBUG # define NDEBUG diff --git a/configure b/configure index 6a83da164..21721689d 100755 --- a/configure +++ b/configure @@ -20150,7 +20150,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default +#ifndef _OPENBSD_SOURCE #define _OPENBSD_SOURCE 1 +#endif #include int main(void) { void* p = reallocarray(NULL, 10, 100); diff --git a/configure.ac b/configure.ac index 05acbe8a0..fc9448f51 100644 --- a/configure.ac +++ b/configure.ac @@ -1450,7 +1450,9 @@ AC_SUBST(LIBOBJ_WITHOUT_CTIMEARC4) AC_MSG_CHECKING([for reallocarray]) AC_LINK_IFELSE([AC_LANG_SOURCE(AC_INCLUDES_DEFAULT [[ +#ifndef _OPENBSD_SOURCE #define _OPENBSD_SOURCE 1 +#endif #include int main(void) { void* p = reallocarray(NULL, 10, 100); @@ -1675,6 +1677,10 @@ AHX_CONFIG_EXT_FLAGS dnl includes [ +#ifndef _OPENBSD_SOURCE +#define _OPENBSD_SOURCE 1 +#endif + #ifndef UNBOUND_DEBUG # ifndef NDEBUG # define NDEBUG diff --git a/doc/Changelog b/doc/Changelog index 3c9e956fe..7c521044b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +29 May 2019: Wouter + - Fix to guard _OPENBSD_SOURCE from redefinition. + 28 May 2019: Wouter - Fix to define _OPENBSD_SOURCE to get reallocarray on NetBSD. - gitignore config.h.in~.