From: Thibault Godouet Date: Wed, 13 Sep 2000 15:45:14 +0000 (+0000) Subject: use gettimeofday only if defined X-Git-Tag: ver2_9_4~577 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe7a363f18acb339f89beef806337763beba3c3f;p=thirdparty%2Ffcron.git use gettimeofday only if defined --- diff --git a/fcron.c b/fcron.c index 9b2871d..19d1007 100644 --- a/fcron.c +++ b/fcron.c @@ -21,11 +21,11 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.27 2000-09-13 15:37:43 thib Exp $ */ + /* $Id: fcron.c,v 1.28 2000-09-13 15:45:14 thib Exp $ */ #include "fcron.h" -char rcs_info[] = "$Id: fcron.c,v 1.27 2000-09-13 15:37:43 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.28 2000-09-13 15:45:14 thib Exp $"; void main_loop(void); void check_signal(void); @@ -503,9 +503,13 @@ main_loop() for (;;) { +#ifdef HAVE_GETTIMEOFDAY sleep(stime - 1); gettimeofday(&tv, NULL); usleep( 1000000 - tv.tv_usec ); +#else + sleep(stime); +#endif /* HAVE_GETTIMEOFDAY */ now = time(NULL);