* Boston, MA 02110-1301, USA.
*/
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
#include <fcntl.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
-#include <sys/time.h>
#include <glib.h>
#include "file.h"
#include "item.h"
int flush_time;
struct event_timeout *timer;
struct callback *timer_callback;
+#ifdef HAVE_SYS_TIME_H
struct timeval last_flush;
+#endif
char *filename;
char *filename_ex1;
char *filename_ex2;
static void
log_set_last_flush(struct log *this_)
{
+#ifdef HAVE_SYS_TIME_H
gettimeofday(&this_->last_flush, NULL);
+#endif
}
static void
static void
log_timer(struct log *this_)
{
+#ifdef HAVE_SYS_TIME_H
struct timeval tv;
int delta;
gettimeofday(&tv, NULL);
dbg(1,"delta=%d flush_time=%d\n", delta, this_->flush_time);
if (this_->flush_time && delta >= this_->flush_time*1000)
log_flush(this_,0);
+#endif
}
int