fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / routines.c
index 2769a5b5d92e45a90f626576bc6b9f0dfbe56616..6f3cd2106b62dbf391fb2b161238b540025d284c 100644 (file)
 #include <signal.h>
 #include <dirent.h>
 #include <errno.h>
-#include <time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
 #include <limits.h>
 #ifdef HAVE_UTMP_H
 #include <utmp.h>