summaryrefslogtreecommitdiff
path: root/src/archive.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2020-02-04 10:31:10 +0200
committerTimo Teräs <timo.teras@iki.fi>2020-02-04 10:31:10 +0200
commit45d313c51cbae20bce0789db86ba82ff79c9b202 (patch)
treed144b6462d34c1ceeaf26fbc87902d515e346e0b /src/archive.c
parent8fc403c582a725b667d0211f9ccd8a217d25c2fc (diff)
downloadapk-tools-45d313c51cbae20bce0789db86ba82ff79c9b202.tar.gz
apk-tools-45d313c51cbae20bce0789db86ba82ff79c9b202.tar.bz2
apk-tools-45d313c51cbae20bce0789db86ba82ff79c9b202.tar.xz
apk-tools-45d313c51cbae20bce0789db86ba82ff79c9b202.zip
remove apk_time() as it is causing problems with shared objects
Instead, to make sure test mode produces same output, redefine time() for the test mode binary. Reverts parts of 0b82bcc53e60.
Diffstat (limited to 'src/archive.c')
-rw-r--r--src/archive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/archive.c b/src/archive.c
index 24676b1..226bc23 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -293,7 +293,7 @@ int apk_tar_write_entry(struct apk_ostream *os, const struct apk_file_info *ae,
PUT_OCTAL(buf.uid, ae->uid);
PUT_OCTAL(buf.gid, ae->gid);
PUT_OCTAL(buf.mode, ae->mode & 07777);
- PUT_OCTAL(buf.mtime, ae->mtime ?: apk_time());
+ PUT_OCTAL(buf.mtime, ae->mtime ?: time(NULL));
/* Checksum */
strcpy(buf.magic, "ustar ");