summaryrefslogtreecommitdiff
path: root/ftparchive/multicompress.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-26 08:15:29 +0100
committerMichael Vogt <mvo@debian.org>2014-01-26 08:15:29 +0100
commit796673c38509300c988fbba2f2679ba3c76916db (patch)
tree403055b486d0a1d65561528582d4b0bdc66e53a0 /ftparchive/multicompress.cc
parent9aef3908c892f9d9349d8bf8a5ceaeea313ba0fe (diff)
parent2f958de6e883ba7b0c9895750d4dde35047f1e82 (diff)
Merge remote-tracking branch 'donkult/debian/sid' into debian/sid
Conflicts: apt-private/private-list.cc doc/po/de.po test/integration/framework
Diffstat (limited to 'ftparchive/multicompress.cc')
-rw-r--r--ftparchive/multicompress.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/ftparchive/multicompress.cc b/ftparchive/multicompress.cc
index 1fea589e2..265fb1a80 100644
--- a/ftparchive/multicompress.cc
+++ b/ftparchive/multicompress.cc
@@ -21,9 +21,9 @@
#include <apt-pkg/error.h>
#include <apt-pkg/md5.h>
+#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <utime.h>
#include <unistd.h>
#include <iostream>
@@ -234,14 +234,12 @@ bool MultiCompress::Finalize(unsigned long long &OutSize)
else
{
// Update the mtime if necessary
- if (UpdateMTime > 0 &&
+ if (UpdateMTime > 0 &&
(Now - St.st_mtime > (signed)UpdateMTime || St.st_mtime > Now))
{
- struct utimbuf Buf;
- Buf.actime = Buf.modtime = Now;
- utime(I->Output.c_str(),&Buf);
+ utimensat(AT_FDCWD, I->Output.c_str(), NULL, AT_SYMLINK_NOFOLLOW);
Changed = true;
- }
+ }
}
// Force the file permissions