From d5e44ef3baa6adfeaad67e253e9e4ebc81fc026b Mon Sep 17 00:00:00 2001 From: thib Date: Thu, 29 Apr 2004 19:28:38 +0000 Subject: [PATCH] declare var tv only when necessary (ie. when we HAVE_GETTIMEOFDAY) --- fcron.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fcron.c b/fcron.c index c5885cc..c4a7372 100644 --- a/fcron.c +++ b/fcron.c @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.69 2003-12-25 22:43:18 thib Exp $ */ + /* $Id: fcron.c,v 1.70 2004-04-29 19:28:38 thib Exp $ */ #include "fcron.h" @@ -33,7 +33,7 @@ #include "socket.h" #endif -char rcs_info[] = "$Id: fcron.c,v 1.69 2003-12-25 22:43:18 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.70 2004-04-29 19:28:38 thib Exp $"; void main_loop(void); void check_signal(void); @@ -221,6 +221,8 @@ xexit(int exit_value) remove(pidfile); + free_conf(); + explain("Exiting with code %d", exit_value); exit (exit_value); @@ -662,9 +664,11 @@ main_loop() * sleep, and then test all jobs and execute if needed. */ { time_t save; /* time remaining until next save */ - struct timeval tv; /* we use usec field to get more precision */ time_t stime; /* time to sleep until next job * execution */ +#ifdef HAVE_GETTIMEOFDAY + struct timeval tv; /* we use usec field to get more precision */ +#endif #ifdef FCRONDYN int retcode = 0; #endif -- 2.40.0