fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / serv_smtp.c
index ddbe9398cdb1e9cdd4ebe3b61bb440f77b7da2c5..55d81f57b3d45d3a897f466e21fe8a060c4d7c0d 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 <time.h>
 #include "citadel.h"
 #include "server.h"
 #include "sysdep_decls.h"