diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-09-12 20:04:44 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-09-12 20:04:44 +0000 |
commit | 6dfe54be869c117676dcc004400ac68096945531 (patch) | |
tree | ed76f34469007b9d182970f03e41384110cbe98a /src | |
parent | 6ba4a6f86811eaa264734012694f5181b00f9abe (diff) | |
download | execline-6dfe54be869c117676dcc004400ac68096945531.tar.xz |
Next try for bad sys/stat.h
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/execline/eltest.c | 9 |
1 files 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 <sys/stat.h> +#include <skalibs/nonposix.h> + #include <unistd.h> #include <string.h> #include <stdlib.h> @@ -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 : { |