From 6bdcf1d043d452ec9d3bf504b25e4092b1fe23c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 3 Dec 2022 13:58:20 +0700 Subject: [PATCH] mtree: patch for new glibc --- srcpkgs/mtree/patches/gcc-12.patch | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 srcpkgs/mtree/patches/gcc-12.patch diff --git a/srcpkgs/mtree/patches/gcc-12.patch b/srcpkgs/mtree/patches/gcc-12.patch new file mode 100644 index 00000000000..59b283bd83f --- /dev/null +++ b/srcpkgs/mtree/patches/gcc-12.patch @@ -0,0 +1,36 @@ +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))