diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-19 17:47:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-19 17:47:11 +0000 |
commit | 77826187692f84b2fd9c85c42d2e8fe49935a681 (patch) | |
tree | d5aaeaa2fc507ec397a0bdc413618a9b5867f9bb /configure.ac | |
parent | 6dd259d216c14ddd99b2b9b96beddfd1153b7387 (diff) | |
download | libmicrohttpd-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.ac | 3 |
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) | |||
190 | AM_CONDITIONAL(USE_PRIVATE_PLIBC_H, test x$our_private_plibc_h = x1) | 190 | AM_CONDITIONAL(USE_PRIVATE_PLIBC_H, test x$our_private_plibc_h = x1) |
191 | 191 | ||
192 | AC_CHECK_FUNCS(memmem) | 192 | AC_CHECK_FUNCS(memmem) |
193 | AC_SEARCH_LIBS([clock_gettime], [rt], [ | ||
194 | AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Have clock_gettime]) | ||
195 | ]) | ||
193 | 196 | ||
194 | # IPv6 | 197 | # IPv6 |
195 | AC_MSG_CHECKING(for IPv6) | 198 | AC_MSG_CHECKING(for IPv6) |