diff options
author | 河辺 岳人 <kabe@sra-tohoku.co.jp> | 2022-09-27 21:10:39 +0900 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 2022-09-27 11:02:44 -0400 |
commit | 0e1eda6f83694ca65612456562c99c703cf0361f (patch) | |
tree | 9d53f211ef54cccfd7a4f5c5ee8f63f8b99036cb /debuginfod/debuginfod-client.c | |
parent | 6cb01b4ef3cdd4f83d21bbcec72fa66712ac14e6 (diff) | |
download | elfutils-0e1eda6f83694ca65612456562c99c703cf0361f.tar.gz |
Retrive 64bit timestamp from curl_easy_getinfo on _TIME_BITS=64 environment
On 32bit system compiled with -D_TIME_BITS=64, following tests failed:
FAIL: run-debuginfod-archive-test.sh
FAIL: run-debuginfod-archive-groom.sh
FAIL: run-debuginfod-archive-rename.sh
FAIL: run-debuginfod-federation-sqlite.sh
FAIL: run-debuginfod-federation-metrics.sh
FAIL: run-debuginfod-federation-link.sh
due to tests/debuginfod-subr.sh:archive_test failing on
"test $fileame -ot `pwd`", with LHS file having a bogus timestamp.
LHS is generated by debuginfo-find as a cache file.
I'm not sure the fix is the correct way, but
since -D_TIME_BITS=64 mandates -D_FILE_OFFSET_BITS=64 in glibc,
this does work on glibc environment.
Signed-off-by: Taketo Kabe <kabe@sra-tohoku.co.jp>
Diffstat (limited to 'debuginfod/debuginfod-client.c')
-rw-r--r-- | debuginfod/debuginfod-client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index 5e5c140a..28ad04c0 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -1392,7 +1392,11 @@ debuginfod_query_server (debuginfod_client *c, /* we've got one!!!! */ time_t mtime; +#if defined(_TIME_BITS) && _TIME_BITS == 64 + CURLcode curl_res = curl_easy_getinfo(verified_handle, CURLINFO_FILETIME_T, (void*) &mtime); +#else CURLcode curl_res = curl_easy_getinfo(verified_handle, CURLINFO_FILETIME, (void*) &mtime); +#endif if (curl_res != CURLE_OK) mtime = time(NULL); /* fall back to current time */ |