the POSIX-standard st_*tim members.
ok millert@
-/* $OpenBSD: edit.c,v 1.35 2015/01/16 06:40:06 deraadt Exp $ */
+/* $OpenBSD: edit.c,v 1.36 2023/08/11 04:45:05 guenther Exp $ */
/* $NetBSD: edit.c,v 1.6 1996/05/15 21:50:45 jtc Exp $ */
/*-
pw_edit(1, tempname);
if (lstat(tempname, &end) == -1 || S_ISLNK(end.st_mode))
return (EDIT_ERROR);
- if (!timespeccmp(&begin.st_mtimespec, &end.st_mtimespec, -) &&
+ if (!timespeccmp(&begin.st_mtim, &end.st_mtim, -) &&
begin.st_size == end.st_size) {
warnx("no changes made");
return (EDIT_NOCHANGE);
-/* $OpenBSD: main.c,v 1.104 2022/10/26 00:40:40 millert Exp $ */
+/* $OpenBSD: main.c,v 1.105 2023/08/11 04:45:05 guenther Exp $ */
/*
* Copyright (c) 1992, 1993
}
if (storename && !cat) {
if (info.mtime != 0) {
- sb->st_mtimespec.tv_sec =
- sb->st_atimespec.tv_sec = info.mtime;
- sb->st_mtimespec.tv_nsec =
- sb->st_atimespec.tv_nsec = 0;
+ sb->st_mtim.tv_sec = sb->st_atim.tv_sec = info.mtime;
+ sb->st_mtim.tv_nsec = sb->st_atim.tv_nsec = 0;
}
}
if (error != FAILURE)
-/* $OpenBSD: function.c,v 1.54 2023/04/01 05:27:44 tb Exp $ */
+/* $OpenBSD: function.c,v 1.55 2023/08/11 04:45:05 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
f_newer(PLAN *plan, FTSENT *entry)
{
- return (entry->fts_statp->st_mtimespec.tv_sec > plan->t_data.tv_sec ||
- (entry->fts_statp->st_mtimespec.tv_sec == plan->t_data.tv_sec &&
- entry->fts_statp->st_mtimespec.tv_nsec > plan->t_data.tv_nsec));
+ return (entry->fts_statp->st_mtim.tv_sec > plan->t_data.tv_sec ||
+ (entry->fts_statp->st_mtim.tv_sec == plan->t_data.tv_sec &&
+ entry->fts_statp->st_mtim.tv_nsec > plan->t_data.tv_nsec));
}
PLAN *
if (stat(filename, &sb))
err(1, "%s", filename);
new = palloc(N_NEWER, f_newer);
- memcpy(&new->t_data, &sb.st_mtimespec, sizeof(struct timespec));
+ memcpy(&new->t_data, &sb.st_mtim, sizeof(struct timespec));
return (new);
}
f_anewer(PLAN *plan, FTSENT *entry)
{
- return (entry->fts_statp->st_atimespec.tv_sec > plan->t_data.tv_sec ||
- (entry->fts_statp->st_atimespec.tv_sec == plan->t_data.tv_sec &&
- entry->fts_statp->st_atimespec.tv_nsec > plan->t_data.tv_nsec));
+ return (entry->fts_statp->st_atim.tv_sec > plan->t_data.tv_sec ||
+ (entry->fts_statp->st_atim.tv_sec == plan->t_data.tv_sec &&
+ entry->fts_statp->st_atim.tv_nsec > plan->t_data.tv_nsec));
}
PLAN *
if (stat(filename, &sb))
err(1, "%s", filename);
new = palloc(N_NEWER, f_anewer);
- memcpy(&new->t_data, &sb.st_atimespec, sizeof(struct timespec));
+ memcpy(&new->t_data, &sb.st_atim, sizeof(struct timespec));
return (new);
}
f_cnewer(PLAN *plan, FTSENT *entry)
{
- return (entry->fts_statp->st_ctimespec.tv_sec > plan->t_data.tv_sec ||
- (entry->fts_statp->st_ctimespec.tv_sec == plan->t_data.tv_sec &&
- entry->fts_statp->st_ctimespec.tv_nsec > plan->t_data.tv_nsec));
+ return (entry->fts_statp->st_ctim.tv_sec > plan->t_data.tv_sec ||
+ (entry->fts_statp->st_ctim.tv_sec == plan->t_data.tv_sec &&
+ entry->fts_statp->st_ctim.tv_nsec > plan->t_data.tv_nsec));
}
PLAN *
if (stat(filename, &sb))
err(1, "%s", filename);
new = palloc(N_NEWER, f_cnewer);
- memcpy(&new->t_data, &sb.st_ctimespec, sizeof(struct timespec));
+ memcpy(&new->t_data, &sb.st_ctim, sizeof(struct timespec));
return (new);
}
-/* $OpenBSD: fileio.c,v 1.111 2023/03/30 19:00:02 op Exp $ */
+/* $OpenBSD: fileio.c,v 1.112 2023/08/11 04:45:05 guenther Exp $ */
/* This file is in the public domain. */
bp->b_fi.fi_mode = sb.st_mode | 0x8000;
bp->b_fi.fi_uid = sb.st_uid;
bp->b_fi.fi_gid = sb.st_gid;
- bp->b_fi.fi_mtime = sb.st_mtimespec;
+ bp->b_fi.fi_mtime = sb.st_mtim;
/* Clear the ignore flag */
bp->b_flag &= ~(BFIGNDIRTY | BFDIRTY);
}
if (stat(bp->b_fname, &sb) == -1)
return (TRUE);
- if (bp->b_fi.fi_mtime.tv_sec != sb.st_mtimespec.tv_sec ||
- bp->b_fi.fi_mtime.tv_nsec != sb.st_mtimespec.tv_nsec)
+ if (bp->b_fi.fi_mtime.tv_sec != sb.st_mtim.tv_sec ||
+ bp->b_fi.fi_mtime.tv_nsec != sb.st_mtim.tv_nsec)
return (FALSE);
return (TRUE);
-/* $OpenBSD: privsep.c,v 1.75 2023/03/08 04:43:15 guenther Exp $ */
+/* $OpenBSD: privsep.c,v 1.76 2023/08/11 04:45:06 guenther Exp $ */
/*
* Copyright (c) 2003 Anil Madhavapeddy <anil@recoil.org>
case PRIV_CONFIG_MODIFIED:
log_debug("[priv]: msg PRIV_CONFIG_MODIFIED received");
if (stat(conf, &cf_stat) == -1 ||
- timespeccmp(&cf_info.st_mtimespec,
- &cf_stat.st_mtimespec, <) ||
+ timespeccmp(&cf_info.st_mtim,
+ &cf_stat.st_mtim, <) ||
cf_info.st_size != cf_stat.st_size) {
log_debug("config file modified: restarting");
restart = result = 1;
-/* $OpenBSD: vipw.c,v 1.26 2021/10/24 21:24:19 deraadt Exp $ */
+/* $OpenBSD: vipw.c,v 1.27 2023/08/11 04:45:05 guenther Exp $ */
/*
* Copyright (c) 1987, 1993, 1994
pw_edit(0, NULL);
if (stat(_PATH_MASTERPASSWD_LOCK, &end))
pw_error(_PATH_MASTERPASSWD_LOCK, 1, 1);
- if (timespeccmp(&begin.st_mtimespec, &end.st_mtimespec, ==) &&
+ if (timespeccmp(&begin.st_mtim, &end.st_mtim, ==) &&
begin.st_size == end.st_size) {
warnx("no changes made");
pw_error((char *)NULL, 0, 0);