From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc30.google.com (mail-oo1-xc30.google.com [IPv6:2607:f8b0:4864:20::c30]) by sourceware.org (Postfix) with ESMTPS id 1839938493EE for ; Mon, 13 Feb 2023 17:13:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1839938493EE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-xc30.google.com with SMTP id w3-20020a4aa443000000b0051ac1e0f6b7so1250448ool.11 for ; Mon, 13 Feb 2023 09:13:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0uQLPBI9BHVyzI3yGG7/HZEgEWJU5QyYm0sC+AlqeIg=; b=aMqCwG6iCz1f+cvJZt2Zcx2bcGt10h9vwK2R4svGb7krzi376CBYk9G45kf2wqnJ4N 9JXcexpHV/L4lg/MHLRJORDhJNwNJz3oWSBiRa3wEqoOGr12pJ17Djha71AUf9NKNDRe uTGGv8V0SN+LvzwFUzMlEFiWDjOUAm7xuerZ2KS/F5F0Us2YHMM1sqLyDHz9mLOLg6eP H+iVtkgndyr0wQmwWic/f6G7u4WBJtI5vvoh8tX40vnB2y5IJbZjD9WBRNCj56pHJjjg gHP0JNHupMqyFjCB2X1UYBL2UxyWliaTFS02GDEb0/lmMy8H393KqtmQ+/XSy0HxCleJ 4LDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0uQLPBI9BHVyzI3yGG7/HZEgEWJU5QyYm0sC+AlqeIg=; b=BSCzgqZw2nv+303EDxJAB+UUHNS8/iv671lRwZfJHQXznMy3qlqvvcQqsDPMv1PKaG KFvwuBDielfx3P8NiyOOMZ77w2yeAXlP6VhBbnRYeSu/4Rrbm6f0njH28oKCiWUWdfPw VEJo46pbcCQ9fy6iQk+vXCSNpRIRzfVtmTbOdqvUWPdZsjyZCT+fXF7XU8ZNoYF8bRHu 8wgiYg5x47IzqNQLZ7uJ9M/kQOCnpCAo1USA/IWcwaFhpM5tn1k/Jv7B5RieLHXqIJ1w PH4sdihLOoumXmFNTMIpgIsiZVSNPcfiqAnoAmKh7VcbhQqg/oCkIZMuA9wLth+90oxa dnLA== X-Gm-Message-State: AO0yUKXWhXLDkCQC9vu/vmmEM1b9ANQswRhhXtw0qNrfs2dSg/HdPvrA GtEFDg4E3Ec3VwemkjPiZSPfMb62ruqDRUQA X-Google-Smtp-Source: AK7set8SPmgWrKu/NjL+/EqFZuPOJJBA4/o3+RHSfT9CzY0GgF98UQx1ZPMkHTpqFMdhxh5OwAL7Tw== X-Received: by 2002:a4a:6b0f:0:b0:511:f3d2:bb8d with SMTP id g15-20020a4a6b0f000000b00511f3d2bb8dmr12690084ooc.5.1676308401849; Mon, 13 Feb 2023 09:13:21 -0800 (PST) Received: from mandiga.. ([2804:1b3:a7c2:f662:138b:cd0c:7b7a:8860]) by smtp.gmail.com with ESMTPSA id q71-20020a4a334a000000b004c60069d1fbsm5045332ooq.11.2023.02.13.09.13.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Feb 2023 09:13:21 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 8/9] support: Use 64 bit time_t routines on support_can_chroot Date: Mon, 13 Feb 2023 14:13:01 -0300 Message-Id: <20230213171302.3045672-9-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230213171302.3045672-1-adhemerval.zanella@linaro.org> References: <20230213171302.3045672-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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: The failure only shows if the system time is set past 2038. Checked on i686-linux-gnu and on system emulated arm-linux-gnueabihf with time set past y2038. --- support/support_can_chroot.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/support/support_can_chroot.c b/support/support_can_chroot.c index 7d9f91205d..626022041a 100644 --- a/support/support_can_chroot.c +++ b/support/support_can_chroot.c @@ -16,6 +16,9 @@ License along with the GNU C Library; if not, see . */ +#define _FILE_OFFSET_BITS 64 +#define _TIME_BITS 64 + #include #include #include @@ -29,14 +32,14 @@ static void callback (void *closure) { int *result = closure; - struct stat64 before; + struct stat before; xstat ("/dev", &before); if (chroot ("/dev") != 0) { *result = errno; return; } - struct stat64 after; + struct stat after; xstat ("/", &after); TEST_VERIFY (before.st_dev == after.st_dev); TEST_VERIFY (before.st_ino == after.st_ino); -- 2.34.1