summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cron/crontab/crontab.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/cron/crontab/crontab.c')
-rw-r--r--usr.sbin/cron/crontab/crontab.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/cron/crontab/crontab.c b/usr.sbin/cron/crontab/crontab.c
index 0071f6a..8ee2ccb 100644
--- a/usr.sbin/cron/crontab/crontab.c
+++ b/usr.sbin/cron/crontab/crontab.c
@@ -31,6 +31,7 @@ static const char rcsid[] =
#include "cron.h"
#include <errno.h>
#include <fcntl.h>
+#include <paths.h>
#include <sys/file.h>
#include <sys/stat.h>
#ifdef USE_UTIMES
@@ -297,8 +298,8 @@ edit_cmd() {
if (errno != ENOENT)
err(ERROR_EXIT, "%s", n);
warnx("no crontab for %s - using an empty one", User);
- if (!(f = fopen("/dev/null", "r")))
- err(ERROR_EXIT, "/dev/null");
+ if (!(f = fopen(_PATH_DEVNULL, "r")))
+ err(ERROR_EXIT, _PATH_DEVNULL);
}
um = umask(077);
OpenPOWER on IntegriCloud