fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / logging.c
index af9b5703124ad9d918e514955b655a9091e3dbba..5ec154cb370cd8ff2b4b540e3b020fccf713788f 100644 (file)
 #include <stdio.h>
 #include <fcntl.h>
 #include <signal.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>