fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / aidepost.c
index 81fbe7784328ba00395118745f36c518d3591777..0ed777b66f457ef428de76c2a86f84248f69eca7 100644 (file)
@@ -7,7 +7,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 <limits.h>
 #include <errno.h>
 #include <string.h>