summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-04-07 00:32:47 -0700
committerDaniel Stenberg <daniel@haxx.se>2021-04-07 16:08:01 +0200
commiteaa1d73229d5aa0c27ec09572b8abdac2676990a (patch)
tree5c9c7a89492a14270852d2157415b36e42ab0f9b /configure.ac
parent812fce9dcfaf26f62b8bfb83ee51b43f83c5291f (diff)
downloadcurl-eaa1d73229d5aa0c27ec09572b8abdac2676990a.tar.gz
configure: include <time.h> unconditionally
In 2682e5f5, several instances of AC_HEADER_TIME were removed since it is a deprecated autoconf macro. However, this was the macro that defined TIME_WITH_SYS_TIME, which was used to indicate that <time.h> can be included alongside <sys/time.h>. TIME_WITH_SYS_TIME is still used in the configure test body and since it is no longer defined, <time.h> is *not* included on systems that have <sys/time.h>. In particular, at least on musl libc and glibc, <sys/time.h> does not implicitly include <time.h> and does not declare clock_gettime, gmtime_r, or localtime_r. This causes configure to fail to detect those functions. The AC_HEADER_TIME macro deprecation text says > All current systems provide time.h; it need not be checked for. > Not all systems provide sys/time.h, but those that do, all allow > you to include it and time.h simultaneously. So, to fix this issue, simply include <time.h> unconditionally when testing for time-related functions and in libcurl, and don't bother checking for it. Closes #6859
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac1
1 files changed, 0 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index f66248150..70932fa3c 100755
--- a/configure.ac
+++ b/configure.ac
@@ -4277,7 +4277,6 @@ AC_CHECK_HEADERS(
sgtty.h \
fcntl.h \
alloca.h \
- time.h \
io.h \
pwd.h \
utime.h \