From 6dfe54be869c117676dcc004400ac68096945531 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 12 Sep 2023 20:04:44 +0000 Subject: Next try for bad sys/stat.h Signed-off-by: Laurent Bercot --- src/execline/eltest.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/execline/eltest.c b/src/execline/eltest.c index d49539d..68b828e 100644 --- a/src/execline/eltest.c +++ b/src/execline/eltest.c @@ -1,6 +1,7 @@ /* ISC license. */ -#include +#include + #include #include #include @@ -362,7 +363,7 @@ static int eltest_run (struct eltest_node_s const *tree, unsigned int root) { struct stat st ; if (stat(tree[tree[root].arg1].data, &st) == -1) return 0 ; - return timespec_cmp(&st.ST_MTIM, &st.ST_ATIM) > 0 ; + return timespec_cmp(&st.st_mtim, &st.st_atim) > 0 ; } case T_EUID : { @@ -387,14 +388,14 @@ static int eltest_run (struct eltest_node_s const *tree, unsigned int root) struct stat st1, st2 ; if (stat(tree[tree[root].arg1].data, &st1) == -1) return 0 ; if (stat(tree[tree[root].arg2].data, &st2) == -1) return 1 ; - return timespec_cmp(&st1.ST_MTIM, &st2.ST_MTIM) > 0 ; + return timespec_cmp(&st1.st_mtim, &st2.st_mtim) > 0 ; } case T_OLDER : { struct stat st1, st2 ; if (stat(tree[tree[root].arg1].data, &st1) == -1) return 1 ; if (stat(tree[tree[root].arg2].data, &st2) == -1) return 0 ; - return timespec_cmp(&st1.ST_MTIM, &st2.ST_MTIM) < 0 ; + return timespec_cmp(&st1.st_mtim, &st2.st_mtim) < 0 ; } case T_DEVINO : { -- cgit 1.4.1