From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id 361D33858C2D for ; Tue, 27 Sep 2022 12:10:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 361D33858C2D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sra-tohoku.co.jp Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sra-tohoku.co.jp Received: by mail-pj1-x1030.google.com with SMTP id g1-20020a17090a708100b00203c1c66ae3so9889796pjk.2 for ; Tue, 27 Sep 2022 05:10:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sra-tohoku-co-jp.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:date:message-id :subject:from:cc:to:from:to:cc:subject:date; bh=ZXnYu+4AcpT/BQNHkH1hKKIvcz1G4DeB7TZwGZIzdIc=; b=497lDRPALt0FP+Xth644goEwMZegyoywCK3vePP+a3FgPRn1bn8fqRID5pW7Z+RtLC VnC6zfeqBKWnS2qa9cyt5ClGcpjArI8aoLsuwcBW+vdIQqv6epZFhIkKy4N/jBX2caK6 knKodGdnaaQsS4YfILNFx3AkciCW/YXI4tKi/wgZI2otZ+vykeGCWN9Trb4B5m8TTluB tSF2g5tRsvlivysc9C6SVW088a+OPxv5J0jIX9SYvRZu/aaDtK8tGYoWddyXJdXpp6AG 7bvXcZeQy5wXoVwPVP+4rOO2oTSvkAKNUR93s/UelPw5gfrsm0KxmfWR8wBnwc79Scfs Kjow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:date:message-id :subject:from:cc:to:x-gm-message-state:from:to:cc:subject:date; bh=ZXnYu+4AcpT/BQNHkH1hKKIvcz1G4DeB7TZwGZIzdIc=; b=Ow06Wcay0jf7w6tX/tqbgKedEup2HqH8tmvxWYMk7jcTWmiwS6T80SYgfZJE2VZEQ0 HLKfkGc2zGg3ub80pUJ3TYBgSjFr6+e83qCNbn2IdtFhtzWHek4evmKTLJsXLO8V2NFF DX+6ZgWAoPHQsD/ESuYW2+Pwq13xRhaedxYtTByi2eE17Wz6rBwteszbBB1obgmqgxoi x3xp0684MInlWeH8Rul62FuASKFsqRcmly4Gbsg/XYObsEqWsbblKzKUktx2JtiTo6/E pz2Eu2TZXclQUikCHDWrRZ96rzCeOhCZYGa0xZowX22fZUyXWYsP2GjATNzWUBpKUliu 5S7g== X-Gm-Message-State: ACrzQf0bzAcGKS1hXX3vsZ4/28hCU51BRo9NpexXdcsV+PtWV0qlCLKr gHk2y+KSVGjhqoa+rvIUiDzqGQ7NXgUMnA== X-Google-Smtp-Source: AMsMyM7NMdccssrPot9NpoYwzQ9u9biNmp0okF1LRyldxhv68DRzwjZvmWxGg0cUeGsJr71wYLo0uw== X-Received: by 2002:a17:902:ea0f:b0:178:23f7:5a30 with SMTP id s15-20020a170902ea0f00b0017823f75a30mr26456132plg.150.1664280644112; Tue, 27 Sep 2022 05:10:44 -0700 (PDT) Received: from [10.5.0.103] ([49.135.100.74]) by smtp.gmail.com with ESMTPSA id b6-20020a17090a8c8600b00202d1745014sm1216934pjo.31.2022.09.27.05.10.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Sep 2022 05:10:43 -0700 (PDT) To: elfutils-devel@sourceware.org Cc: =?UTF-8?B?5rKz6L66IOWys+S6ug==?= From: =?UTF-8?B?5rKz6L66IOWys+S6ug==?= Subject: [PATCH] Retrive 64bit timestamp from curl_easy_getinfo on _TIME_BITS=64 environment Message-ID: <239f24ed-acd5-4bcc-352b-229057f04f00@sra-tohoku.co.jp> Date: Tue, 27 Sep 2022 21:10:39 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 --- ChangeLog | 5 +++++ debuginfod/debuginfod-client.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5421f5b8..1f449d60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2022-09-27 Taketo Kabe + + * debuginfod/debuginfod-client.c: Correctly get timestamp when + compiling with -D_TIME_BITS=64 on 32bit environment. + 2022-04-28 Di Chen * NEWS: Add readefl -D, --use-dynamic. 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 */ -- 2.31.1