Revert "sys/time.h no longer needed on modern systems"
[citadel.git] / webcit / sysdep.c
index 44878c757ecd54e6f89b35098bdf115ef0016c10..fb34a4cef9d04b7c748f286412cb5d539e17108e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * WebCit "system dependent" code.
  *
- * Copyright (c) 1996-2014 by the citadel.org team
+ * Copyright (c) 1996-2012 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 3.
 #include <sys/socket.h>
 #include <syslog.h>
 #include <sys/syslog.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 <sys/resource.h>
 #include <netinet/in.h>