From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x29.google.com (mail-oa1-x29.google.com [IPv6:2001:4860:4864:20::29]) by sourceware.org (Postfix) with ESMTPS id D2C3B3856DD4 for ; Wed, 1 Jun 2022 17:40:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D2C3B3856DD4 Received: by mail-oa1-x29.google.com with SMTP id 586e51a60fabf-f2a4c51c45so3630702fac.9 for ; Wed, 01 Jun 2022 10:40:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bE49zqUhcbzT9ZtGU5Pn2XrcuRoNNNvS7a3+SkI5QHw=; b=ISzm6ZPDHbgTA7/eCHSps07KSoH1+oi4W6rlMxxLLkJ7yfUzwgkg5CNpZ1soeXmOQX ppM/9Xy1rmYmPu2CNjGQ0t8yWWipY6Qg9bDejagOmGBzwdX6RktS+IY9j+NTSGWySmwz Y5lWfB1F45KLy9KRqtZthoZ71X89c6teTNplLmkJX6n4FMRadpEVQtZX1wCk1h2Wf7Rt VKika6jSP5V262sRmAa9xlZr1Vs3Itajelt02tzXdOsyo4DAche8NMwOj8ma7NFhgahY nzsEl97gg+1WmWWESJuYQ+N/cF6DqxORKVkbaEPJ59q1fRKmEX7zlbLsIg6zzdcN6hcV NgjA== X-Gm-Message-State: AOAM531D00ZbkN9e4Asf4O68Oo5qa1gA644bfoc+22Jt+20HTt7ZykLQ yIPgqQFEYVZyrrVdACpESnZ4AxSud+99QA== X-Google-Smtp-Source: ABdhPJwhK119H4Jsl3dLXG3I+yUM2o1fs6psM45djV53KHhF4kypulB/9gB4FYT8c7ZHlVB5mpkOqA== X-Received: by 2002:a05:6870:f149:b0:de:e873:4a46 with SMTP id l9-20020a056870f14900b000dee8734a46mr357968oac.286.1654105212969; Wed, 01 Jun 2022 10:40:12 -0700 (PDT) Received: from birita.. ([2804:431:c7ca:e39c:a183:7f80:9e50:177b]) by smtp.gmail.com with ESMTPSA id l14-20020a0568301d6e00b0060ae954bf27sm1052578oti.62.2022.06.01.10.40.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 10:40:12 -0700 (PDT) From: Adhemerval Zanella To: libc-stable@sourceware.org Subject: [COMMITTED 2.35 3/8] posix: Use 64 bit stat for posix_fallocate fallback (BZ# 29207) Date: Wed, 1 Jun 2022 14:40:01 -0300 Message-Id: <20220601174006.219504-3-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220601174006.219504-1-adhemerval.zanella@linaro.org> References: <20220601174006.219504-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: libc-stable@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-stable mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2022 17:40:15 -0000 This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit 574ba60fc8a7fb35e6216e2fdecc521acab7ffd2) --- NEWS | 1 + sysdeps/posix/posix_fallocate.c | 4 ++-- sysdeps/posix/posix_fallocate64.c | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index ef700e0e2c..6783d18015 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,7 @@ The following bugs are resolved with this release: failure [29203] libc: daemon is not y2038 aware [29204] libc: getusershell is not 2038 aware + [29207] libc: posix_fallocate fallback implementation is not y2038 Version 2.35 diff --git a/sysdeps/posix/posix_fallocate.c b/sysdeps/posix/posix_fallocate.c index 037d328647..9720e71cc6 100644 --- a/sysdeps/posix/posix_fallocate.c +++ b/sysdeps/posix/posix_fallocate.c @@ -30,7 +30,7 @@ int posix_fallocate (int fd, __off_t offset, __off_t len) { - struct stat64 st; + struct __stat64_t64 st; if (offset < 0 || len < 0) return EINVAL; @@ -48,7 +48,7 @@ posix_fallocate (int fd, __off_t offset, __off_t len) } /* We have to make sure that this is really a regular file. */ - if (__fstat64 (fd, &st) != 0) + if (__fstat64_time64 (fd, &st) != 0) return EBADF; if (S_ISFIFO (st.st_mode)) return ESPIPE; diff --git a/sysdeps/posix/posix_fallocate64.c b/sysdeps/posix/posix_fallocate64.c index a670ee0a39..bf984f7f91 100644 --- a/sysdeps/posix/posix_fallocate64.c +++ b/sysdeps/posix/posix_fallocate64.c @@ -30,7 +30,7 @@ int __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len) { - struct stat64 st; + struct __stat64_t64 st; if (offset < 0 || len < 0) return EINVAL; @@ -48,7 +48,7 @@ __posix_fallocate64_l64 (int fd, __off64_t offset, __off64_t len) } /* We have to make sure that this is really a regular file. */ - if (__fstat64 (fd, &st) != 0) + if (__fstat64_time64 (fd, &st) != 0) return EBADF; if (S_ISFIFO (st.st_mode)) return ESPIPE; -- 2.34.1