]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_imap.c
fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / serv_imap.c
index f78984deb3bb477d99b62c1ad6cca651dd446c64..b51141b393959aadffa862a6ed36afa8cbb0718c 100644 (file)
 #include <pwd.h>
 #include <errno.h>
 #include <sys/types.h>
-#include <sys/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 <sys/wait.h>
 #include <ctype.h>
 #include <string.h>
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include <time.h>
 #include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"