fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / internetmail.c
index 861aeb5c2bd194cd5f6ed703c6253b0f7bf981ed..c2aba231d83a60b7ccca6cdb2bbb12e27c48ef4e 100644 (file)
 #include <unistd.h>
 #include <stdio.h>
 #include <fcntl.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 <ctype.h>
 #include <syslog.h>