diff options
Diffstat (limited to 'lib/tar/read_header.c')
-rw-r--r-- | lib/tar/read_header.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/tar/read_header.c b/lib/tar/read_header.c index 0591879..2918d09 100644 --- a/lib/tar/read_header.c +++ b/lib/tar/read_header.c @@ -155,17 +155,17 @@ static int decode_header(const tar_header_t *hdr, unsigned int set_by_pax, break; } -#if SIZEOF_TIME_T < 8 - if (out->mtime > (sqfs_s64)INT32_MAX) { - out->sb.st_mtime = INT32_MAX; - } else if (out->mtime < (sqfs_s64)INT32_MIN) { - out->sb.st_mtime = INT32_MIN; + if (sizeof(time_t) * CHAR_BIT < 64) { + if (out->mtime > (sqfs_s64)INT32_MAX) { + out->sb.st_mtime = INT32_MAX; + } else if (out->mtime < (sqfs_s64)INT32_MIN) { + out->sb.st_mtime = INT32_MIN; + } else { + out->sb.st_mtime = out->mtime; + } } else { out->sb.st_mtime = out->mtime; } -#else - out->sb.st_mtime = out->mtime; -#endif return 0; } |