summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2021-10-10 00:08:02 -0700
committerDave Beckett <dave@dajobe.org>2021-10-10 00:08:02 -0700
commit2a932cbb9376cb2a5270bea5fcbbf94167ef6394 (patch)
tree84e7d2ff9ade8973d38d6f0bb51063387639457e
parent86ef127bf2438fbef6622f4d6c0a29d561fff8da (diff)
downloadraptor-2a932cbb9376cb2a5270bea5fcbbf94167ef6394.tar.gz
Fix headers after removal of AC_HEADER_TIME
-rw-r--r--configure.ac2
-rw-r--r--src/parsedate.y6
-rw-r--r--src/raptor_internal.h14
3 files changed, 10 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 45f9c885..fa7b1f47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -325,7 +325,7 @@ CPPFLAGS="$extra_compiler_cflags $CPPFLAGS"
dnl Checks for header files.
-AC_CHECK_HEADERS(errno.h fcntl.h getopt.h limits.h setjmp.h stddef.h stdlib.h strings.h string.h sys/param.h sys/stat.h sys/time.h unistd.h)
+AC_CHECK_HEADERS(errno.h fcntl.h getopt.h limits.h setjmp.h stddef.h stdlib.h strings.h string.h sys/param.h sys/stat.h sys/time.h time.h unistd.h)
AC_CHECK_FUNCS(stat)
dnl FreeBSD fetch.h needs stdio.h and sys/param.h first
AC_CHECK_HEADERS(fetch.h,,,
diff --git a/src/parsedate.y b/src/parsedate.y
index a0ff6e82..437cdf50 100644
--- a/src/parsedate.y
+++ b/src/parsedate.y
@@ -29,11 +29,13 @@
#include <stdio.h>
#include <sys/types.h>
-#include <time.h>
#include <ctype.h>
#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+#include <sys/time.h>
+#endif
+#ifdef TIME_H
+#include <time.h>
#endif
#ifdef HAVE_STDLIB_H
diff --git a/src/raptor_internal.h b/src/raptor_internal.h
index 3767c66a..2ea00734 100644
--- a/src/raptor_internal.h
+++ b/src/raptor_internal.h
@@ -1226,15 +1226,11 @@ struct raptor_uri_detail_s
/* for time_t */
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
+#ifdef SYS_TIME_H
+#include <sys/time.h>
+#endif
+#ifdef TIME_H
+#include <time.h>
#endif
/* parsedate.c */