From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id BD4F8385781C for ; Tue, 22 Jun 2021 19:37:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BD4F8385781C Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-566-QydwEtaSN1-2Fqpll7XcMA-1; Tue, 22 Jun 2021 15:37:52 -0400 X-MC-Unique: QydwEtaSN1-2Fqpll7XcMA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D394918D6A25; Tue, 22 Jun 2021 19:37:51 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-112-211.ams2.redhat.com [10.36.112.211]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2881017C5F; Tue, 22 Jun 2021 19:37:46 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH 01/18] Use 64 bit time_t stat internally References: <20210617115104.1359598-1-adhemerval.zanella@linaro.org> <20210617115104.1359598-2-adhemerval.zanella@linaro.org> Date: Tue, 22 Jun 2021 21:37:45 +0200 In-Reply-To: <20210617115104.1359598-2-adhemerval.zanella@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Thu, 17 Jun 2021 08:50:47 -0300") Message-ID: <87sg19adx2.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jun 2021 19:37:55 -0000 * Adhemerval Zanella via Libc-alpha: > diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c > index b7e1aee80f..b2831508c4 100644 > --- a/sysdeps/posix/getaddrinfo.c > +++ b/sysdeps/posix/getaddrinfo.c > @@ -1636,16 +1636,17 @@ static int gaiconf_reload_flag_ever_set; > /* Last modification time. */ > #ifdef _STATBUF_ST_NSEC > =20 > -static struct timespec gaiconf_mtime; > +static struct __timespec64 gaiconf_mtime; > =20 > static inline void > -save_gaiconf_mtime (const struct stat64 *st) > +save_gaiconf_mtime (const struct __stat64_t64 *st) > { > - gaiconf_mtime =3D st->st_mtim; > + gaiconf_mtime =3D (struct __timespec64) { .tv_sec =3D st->st_mtim.tv_= sec, > +=09=09=09=09=09 .tv_nsec =3D st->st_mtim.tv_nsec }; > } > =20 > static inline bool > -check_gaiconf_mtime (const struct stat64 *st) > +check_gaiconf_mtime (const struct __stat64_t64 *st) > { > return (st->st_mtim.tv_sec =3D=3D gaiconf_mtime.tv_sec > && st->st_mtim.tv_nsec =3D=3D gaiconf_mtime.tv_nsec); > @@ -1656,13 +1657,13 @@ check_gaiconf_mtime (const struct stat64 *st) > static time_t gaiconf_mtime; > =20 > static inline void > -save_gaiconf_mtime (const struct stat64 *st) > +save_gaiconf_mtime (const struct __stat64_t64 *st) > { > gaiconf_mtime =3D st->st_mtime; > } > =20 Apparently this caused: ../sysdeps/posix/getaddrinfo.c: In function =E2=80=98save_gaiconf_mtime=E2= =80=99: ../sysdeps/posix/getaddrinfo.c:1644:19: error: incompatible types when assi= gning to type =E2=80=98struct __timespec64=E2=80=99 from type =E2=80=98stru= ct timespec=E2=80=99 1644 | gaiconf_mtime =3D st->st_mtim; | ^~ I do not know the state of 64-bit time_t on Hurd. Thanks, Florian