#endif
#include <time.h>
-#ifndef time
+#if defined(HAVE_SYS_TIME_H) && defined(TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+#endif
+#if ! HAVE_DECL_TIME
time_t time ();
#endif
+#ifdef HAVE_UTIME_H
+# include <utime.h>
+#endif
+
/* Library modules. */
#include <dirname.h>