From: Wouter Wijngaards Date: Fri, 11 Jul 2014 14:27:14 +0000 (+0000) Subject: - fix strptime implicit declaration error on OpenBSD. X-Git-Tag: release-1.5.0rc1~89 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8786ae15b4922880182f41354c91365c620f67f9;p=thirdparty%2Funbound.git - fix strptime implicit declaration error on OpenBSD. git-svn-id: file:///svn/unbound/trunk@3171 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/configure b/configure index e374dc8b0..aa10bd2ec 100755 --- a/configure +++ b/configure @@ -15053,7 +15053,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 #include int main(void) { struct tm tm; char *res; res = strptime("2010-07-15T00:00:00+00:00", "%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t", &tm); diff --git a/configure.ac b/configure.ac index d2a57e6c1..066b5e9c0 100644 --- a/configure.ac +++ b/configure.ac @@ -316,7 +316,7 @@ AC_DEFUN([AC_CHECK_STRPTIME_WORKS], AC_MSG_CHECKING(whether strptime works) if test c${cross_compiling} = cno; then AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#define _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 #include int main(void) { struct tm tm; char *res; res = strptime("2010-07-15T00:00:00+00:00", "%t%Y%t-%t%m%t-%t%d%tT%t%H%t:%t%M%t:%t%S%t", &tm); diff --git a/doc/Changelog b/doc/Changelog index d5111329d..1fae6ace8 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,7 @@ dependencies, from OpenBSD. arc4_lock and sha512 in compat. This makes arc4random available on all platforms, except when compiled with LIBNSS (it uses libNSS crypto random). + - fix strptime implicit declaration error on OpenBSD. 4 July 2014: Wouter - Fix #593: segfault or crash upon rotating logfile.