aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-19 17:47:11 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-19 17:47:11 +0000
commit77826187692f84b2fd9c85c42d2e8fe49935a681 (patch)
treed5aaeaa2fc507ec397a0bdc413618a9b5867f9bb /configure.ac
parent6dd259d216c14ddd99b2b9b96beddfd1153b7387 (diff)
downloadlibmicrohttpd-77826187692f84b2fd9c85c42d2e8fe49935a681.tar.gz
libmicrohttpd-77826187692f84b2fd9c85c42d2e8fe49935a681.zip
Mike Crowe sends this patch:
Change various uses of time(NULL) to new MHD_monotonic_time() function to make timeouts immune to the system real time clock changing. Leave one call to time(2) which continues to use the real time for the HTTP Date: header. If clock_gettime does not support CLOCK_MONOTONIC then fall through to calling time(NULL) instead. This will be problematic if clock_gettime sometimes fails and sometimes succeeds but that shouldn't happen. The autoconf magic was lifted from http://lists.gnu.org/archive/html/autoconf/2010-08/msg00035.html
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 41d54722..7b472784 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,6 +190,9 @@ AC_CHECK_HEADERS([plibc.h],our_private_plibc_h=0,our_private_plibc_h=1)
190AM_CONDITIONAL(USE_PRIVATE_PLIBC_H, test x$our_private_plibc_h = x1) 190AM_CONDITIONAL(USE_PRIVATE_PLIBC_H, test x$our_private_plibc_h = x1)
191 191
192AC_CHECK_FUNCS(memmem) 192AC_CHECK_FUNCS(memmem)
193AC_SEARCH_LIBS([clock_gettime], [rt], [
194 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Have clock_gettime])
195])
193 196
194# IPv6 197# IPv6
195AC_MSG_CHECKING(for IPv6) 198AC_MSG_CHECKING(for IPv6)