fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / serv_pas2.c
index 9c561bd2af6665bc179674bb38537d85dcf9d961..8ed5dccd91559811f863f829002795b22a4df4a6 100644 (file)
@@ -6,7 +6,18 @@
 #include <stdlib.h>
 #include <unistd.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 <ctype.h>
 #include <string.h>
 #include <errno.h>