summaryrefslogtreecommitdiff
path: root/debuginfod/debuginfod-client.c
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig) <heftig@archlinux.org>2023-03-24 01:48:03 +0100
committerFrank Ch. Eigler <fche@redhat.com>2023-03-29 16:43:54 -0400
commitadcc81a03f286404b4e661759e1eb1dd10baf774 (patch)
tree25e8b6bfbc906044a0680a4514c85adf47ca1cf2 /debuginfod/debuginfod-client.c
parenta9bf65487df83c7b4ebbab4ff77b57e0c17f7c33 (diff)
downloadelfutils-adcc81a03f286404b4e661759e1eb1dd10baf774.tar.gz
debuginfod: Replace futimes with futimens
Similar to what 8c4aa0ef998191ed828a37190dc179b91649938a did for ar and strip, replace the non-standard futimes with the POSIX futimens. Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Diffstat (limited to 'debuginfod/debuginfod-client.c')
-rw-r--r--debuginfod/debuginfod-client.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index d6d3f0dd..4b6f93a7 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -1721,10 +1721,10 @@ debuginfod_query_server (debuginfod_client *c,
if (curl_res != CURLE_OK)
mtime = time(NULL); /* fall back to current time */
- struct timeval tvs[2];
+ struct timespec tvs[2];
tvs[0].tv_sec = tvs[1].tv_sec = mtime;
- tvs[0].tv_usec = tvs[1].tv_usec = 0;
- (void) futimes (fd, tvs); /* best effort */
+ tvs[0].tv_nsec = tvs[1].tv_nsec = 0;
+ (void) futimens (fd, tvs); /* best effort */
/* PR27571: make cache files casually unwriteable; dirs are already 0700 */
(void) fchmod(fd, 0400);