From 6712656eb2a8fbab9f8cc1c2dd744eaf5fffbcd5 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 13 Nov 2006 10:39:15 +0000 Subject: [PATCH] (mtime_coder): Treat non-null data as a pointer to struct timespec, overriding st->mtime --- src/xheader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xheader.c b/src/xheader.c index 5676dca..36afd3d 100644 --- a/src/xheader.c +++ b/src/xheader.c @@ -1094,9 +1094,10 @@ ctime_decoder (struct tar_stat_info *st, static void mtime_coder (struct tar_stat_info const *st, char const *keyword, - struct xheader *xhdr, void const *data __attribute__ ((unused))) + struct xheader *xhdr, void const *data) { - code_time (st->mtime, keyword, xhdr); + const struct timespec mtime = data ? *(struct timespec *) data : st->mtime; + code_time (mtime, keyword, xhdr); } static void -- 2.44.0