void-packages/srcpkgs/mtree/patches/gcc-12.patch

37 lines
1.8 KiB
Diff

Index: mtree-1.0.4/compare.c
===================================================================
--- mtree-1.0.4.orig/compare.c
+++ mtree-1.0.4/compare.c
@@ -183,13 +183,13 @@ typeerr: LABEL;
* Catches nano-second differences, but doesn't display them.
*/
if ((s->flags & F_TIME) &&
- ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtimespec.tv_sec) ||
- (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtimespec.tv_nsec))) {
+ ((s->st_mtimespec.tv_sec != p->fts_statp->st_mtim.tv_sec) ||
+ (s->st_mtimespec.tv_nsec != p->fts_statp->st_mtim.tv_nsec))) {
LABEL;
(void)printf("%smodification time expected %.24s ",
tab, ctime(&s->st_mtimespec.tv_sec));
(void)printf("found %.24s",
- ctime(&p->fts_statp->st_mtimespec.tv_sec));
+ ctime(&p->fts_statp->st_mtim.tv_sec));
if (uflag) {
tv[0].tv_sec = s->st_mtimespec.tv_sec;
tv[0].tv_usec = s->st_mtimespec.tv_nsec / 1000;
Index: mtree-1.0.4/create.c
===================================================================
--- mtree-1.0.4.orig/create.c
+++ mtree-1.0.4/create.c
@@ -213,8 +213,8 @@ statf(int indent, FTSENT *p)
(intmax_t)p->fts_statp->st_size);
if (keys & F_TIME)
output(indent, &offset, "time=%ld.%09ld",
- (long)p->fts_statp->st_mtimespec.tv_sec,
- p->fts_statp->st_mtimespec.tv_nsec);
+ (long)p->fts_statp->st_mtim.tv_sec,
+ p->fts_statp->st_mtim.tv_nsec);
if (keys & F_CKSUM && S_ISREG(p->fts_statp->st_mode)) {
if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0 ||
crc(fd, &val, &len))