fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / readlog.c
index 4a221b4d8649d02314ae2faa8fe29a017d9c7fe4..b11dbf46c902f0b3f3bfe38509b5e01b9bb4fb0e 100644 (file)
@@ -8,7 +8,18 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdio.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 <string.h>
 #include <errno.h>
 #include "citadel.h"