summaryrefslogtreecommitdiff
path: root/usr.sbin/cron/crontab.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2016-01-11 14:23:51 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2016-01-11 14:23:51 +0000
commitd5e0dfa29205f4b236215fe2454b6ffc7bacec86 (patch)
treeb5e35b646b71b4b27dc5de2c3b4bd85ae5562e89 /usr.sbin/cron/crontab.c
parentebad9f2ea5cde3598dec641799e5ea4d09a67585 (diff)
When caching the mtime of the spool directory and system crontab files,
stash a struct timespec, not just a time_t. Fixes a bug where cron could skip re-reading the spool after two consecutive changes.
Diffstat (limited to 'usr.sbin/cron/crontab.c')
-rw-r--r--usr.sbin/cron/crontab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c
index ce26afc493a..d22aae2538d 100644
--- a/usr.sbin/cron/crontab.c
+++ b/usr.sbin/cron/crontab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crontab.c,v 1.91 2015/11/17 21:56:57 millert Exp $ */
+/* $OpenBSD: crontab.c,v 1.92 2016/01/11 14:23:50 millert Exp $ */
/* Copyright 1988,1990,1993,1994 by Paul Vixie
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
@@ -19,6 +19,7 @@
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/time.h>
#include <sys/wait.h>
#include <bitstring.h> /* for structs.h */