Use st_mtime as opposed to st_mtim.tv_sec
This is more portable and fixes a build issue on NetBSD. We ignore nanoseconds in this case so there's no functional difference.
This commit is contained in:
parent
cd51795423
commit
b08bb6aad6
4
find.c
4
find.c
|
@ -458,7 +458,7 @@ pri_print(Arg *arg)
|
||||||
static int
|
static int
|
||||||
pri_newer(Arg *arg)
|
pri_newer(Arg *arg)
|
||||||
{
|
{
|
||||||
return arg->st->st_mtim.tv_sec > (time_t)arg->extra.i;
|
return arg->st->st_mtime > (time_t)arg->extra.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -677,7 +677,7 @@ get_newer_arg(char **argv, Extra *extra)
|
||||||
if (stat(*argv, &st))
|
if (stat(*argv, &st))
|
||||||
eprintf("failed to stat '%s':", *argv);
|
eprintf("failed to stat '%s':", *argv);
|
||||||
|
|
||||||
extra->i = st.st_mtim.tv_sec;
|
extra->i = st.st_mtime;
|
||||||
return argv;
|
return argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user