diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2023-09-12 20:19:03 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2023-09-12 20:19:03 +0000 |
commit | feebccb9dcc96e0b333f76a86aa7098881403d1a (patch) | |
tree | 8e00a4928ca8f29a648fde33ec80fe9d295dc469 | |
parent | 919a8f8e32f7926a2a026e5f5671b45ac1e2214e (diff) | |
download | s6-dns-feebccb9dcc96e0b333f76a86aa7098881403d1a.tar.xz |
New tentative workaround for bad sys/stat.h
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r-- | src/libs6dns/s6dns_hosts_init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libs6dns/s6dns_hosts_init.c b/src/libs6dns/s6dns_hosts_init.c index 093b5b8..19a4918 100644 --- a/src/libs6dns/s6dns_hosts_init.c +++ b/src/libs6dns/s6dns_hosts_init.c @@ -1,13 +1,15 @@ /* ISC license. */ +#include <skalibs/nonposix.h> + #include <string.h> #include <unistd.h> #include <errno.h> #include <stdlib.h> -#include <sys/stat.h> #include <time.h> #include <skalibs/posixplz.h> +#include <skalibs/stat.h> #include <skalibs/cdb.h> #include <skalibs/djbtime.h> #include <skalibs/djbunix.h> @@ -29,7 +31,7 @@ int s6dns_hosts_init (cdb *c, char const *txtfile, char const *cdbfile, char con if (errno == ENOENT) goto useit ; else goto errc ; } - if (timespec_cmp(&stc.ST_MTIM, &str.ST_MTIM) > 0) goto useit ; + if (timespec_cmp(&stc.st_mtim, &str.st_mtim) > 0) goto useit ; fd_close(fdc) ; } |