fix all the <time.h> vs. <sys/time.h> issues, hopefully
[citadel.git] / citadel / genstamp.c
index 1ca2752cd6f2d4527dee237807137cfed3cb9a2c..627ffc19cf31aaf31f7e75179b9ef4c322378725 100644 (file)
@@ -9,7 +9,18 @@
 #include <stdlib.h>
 #include <ctype.h>
 #include <string.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 "genstamp.h"