From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc2d.google.com (mail-oo1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) by sourceware.org (Postfix) with ESMTPS id CD009383667F for ; Wed, 1 Jun 2022 17:40:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CD009383667F Received: by mail-oo1-xc2d.google.com with SMTP id o13-20020a4a84cd000000b0041161ec8419so475173oog.6 for ; Wed, 01 Jun 2022 10:40:19 -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=VWJtIdc8mzcrlWM3zaQZdRHvQWRPy4Ls6YgQDdROnjw=; b=wkjwnDGXTiencJ7mpyv+XMtrPMr+BUs47Ts2j3c0+qMSXtvDsu6bkA40n3+kK6kgGr p09DGkaMvLRG8uzMafwEnl5W2ItI21Mlkk/dFY0p85pGnOBRZYinXAU3Fb5AerqtzK6o KczIRziNE6RUq/BCxeaWkMtWuBeo9tF55e8cscPFDKa923hzTZx0KxkxY5alcnBy0pH0 StVJnt7FFFNuNIBriM7mmzZlYAvSiNP3pgWARII1lGMgsXKtJ+3ALoW4FkMxTYhXL6d9 yaJpv8nlMtDPP6nF1hBuUHMNCDUb9+IwrRPIQGYYTnh8PXieHvZOOKPRebe3HXtcqQhF 061w== X-Gm-Message-State: AOAM530umhxcDiGarj28HsKL68wPv3dyrv3yBUIV1fb5ES8WnvKi2PaQ Bk9SOKODnQfH3/Or3o13zCDH9suf3EjU3Q== X-Google-Smtp-Source: ABdhPJzb5NEaY18KwsLo8QZm7M3f/UJ3hrmxIk6SnLDoHWp40fKvCrEkAh77/Wlot0fM05yoXQXLtw== X-Received: by 2002:a4a:e54e:0:b0:415:4e61:1cf9 with SMTP id s14-20020a4ae54e000000b004154e611cf9mr365732oot.74.1654105219000; Wed, 01 Jun 2022 10:40:19 -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.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 10:40:18 -0700 (PDT) From: Adhemerval Zanella To: libc-stable@sourceware.org Subject: [COMMITTED 2.35 8/8] iconv: Use 64 bit stat for gconv_parseconfdir (BZ# 29213) Date: Wed, 1 Jun 2022 14:40:06 -0300 Message-Id: <20220601174006.219504-8-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=-11.9 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, URIBL_BLACK 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:21 -0000 The issue is only when used within libc.so (iconvconfig already builds with _TIME_SIZE=64). This is a missing spot initially from 52a5fe70a2c77935. Checked on i686-linux-gnu. (cherry picked from commit c789e6e40974e2b67bd33a17f29b20dce6ae8822) --- NEWS | 1 + iconv/gconv_parseconfdir.h | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index beaaf7a6c2..8cea3b52d3 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ The following bugs are resolved with this release: [29209] libc: isfdtype is not y2038 aware [29210] network: ruserpass is not y2038 aware [29211] libc: __open_catalog is not y2038 aware + [29213] libc: gconv_parseconfdir is not y2038 aware Version 2.35 diff --git a/iconv/gconv_parseconfdir.h b/iconv/gconv_parseconfdir.h index c0de548833..debb96b322 100644 --- a/iconv/gconv_parseconfdir.h +++ b/iconv/gconv_parseconfdir.h @@ -32,8 +32,11 @@ # define readdir __readdir # define closedir __closedir # define mempcpy __mempcpy -# define lstat64 __lstat64 +# define struct_stat struct __stat64_t64 +# define lstat __lstat64_time64 # define feof_unlocked __feof_unlocked +#else +# define struct_stat struct stat #endif /* Name of the file containing the module information in the directories @@ -158,12 +161,12 @@ gconv_parseconfdir (const char *prefix, const char *dir, size_t dir_len) && strcmp (ent->d_name + len - strlen (suffix), suffix) == 0) { char *conf; - struct stat64 st; + struct_stat st; if (asprintf (&conf, "%s/%s", buf, ent->d_name) < 0) continue; if (ent->d_type != DT_UNKNOWN - || (lstat64 (conf, &st) != -1 && S_ISREG (st.st_mode))) + || (lstat (conf, &st) != -1 && S_ISREG (st.st_mode))) found |= read_conf_file (conf, dir, dir_len); free (conf); -- 2.34.1