linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
0039-pax-Only-use-_PC_TIMESTAMP_RESOLUTION-if-it-is-defin.patch
(1304B)
1 From 7977b9211356095517951e86fa53f64c6b27e16b Mon Sep 17 00:00:00 2001
2 From: Michael Forney <mforney@mforney.org>
3 Date: Tue, 29 Apr 2025 16:50:16 -0700
4 Subject: [PATCH] pax: Only use _PC_TIMESTAMP_RESOLUTION if it is defined
5
6 ---
7 bin/pax/ar_subs.c | 6 +++++-
8 1 file changed, 5 insertions(+), 1 deletion(-)
9
10 diff --git a/bin/pax/ar_subs.c b/bin/pax/ar_subs.c
11 index 4c49efa1362..a0e4fdfdea5 100644
12 --- a/bin/pax/ar_subs.c
13 +++ b/bin/pax/ar_subs.c
14 @@ -167,12 +167,13 @@ cmp_file_times(int mtime_flag, int ctime_flag, ARCHD *arcn, const char *path)
15 else if (timespeccmp(&arcn->sb.st_mtim, &sb.st_mtim, <=))
16 return 1;
17
18 +#ifdef _PC_TIMESTAMP_RESOLUTION
19 /*
20 * If we got here then the target arcn > sb for mtime *and* that's
21 * the deciding factor. Check whether they're equal after rounding
22 * down the arcn mtime to the precision of the target path.
23 */
24 - res = pathconfat(AT_FDCWD, path, _PC_TIMESTAMP_RESOLUTION,
25 + res = pathconf(path, _PC_TIMESTAMP_RESOLUTION,
26 AT_SYMLINK_NOFOLLOW);
27 if (res == -1)
28 return 0;
29 @@ -195,6 +196,9 @@ cmp_file_times(int mtime_flag, int ctime_flag, ARCHD *arcn, const char *path)
30 return ((arcn->sb.st_mtime / res) * res) <= sb.st_mtime;
31 return arcn->sb.st_mtime <= ((sb.st_mtime / res) * res);
32 }
33 +#else
34 + return 0;
35 +#endif
36 }
37
38 /*
39 --
40 2.49.0
41