From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/14897 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH v2] remaining steps for time64 switchover Date: Fri, 1 Nov 2019 20:02:33 -0400 Message-ID: <20191102000233.GQ16318@brightrain.aerifal.cx> References: <20191101202539.GA8982@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="231889"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-14913-gllmg-musl=m.gmane.org@lists.openwall.com Sat Nov 02 01:02:48 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1iQgsS-000yDr-IJ for gllmg-musl@m.gmane.org; Sat, 02 Nov 2019 01:02:48 +0100 Original-Received: (qmail 22397 invoked by uid 550); 2 Nov 2019 00:02:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22376 invoked from network); 2 Nov 2019 00:02:45 -0000 Content-Disposition: inline In-Reply-To: <20191101202539.GA8982@brightrain.aerifal.cx> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:14897 Archived-At: On Fri, Nov 01, 2019 at 04:25:40PM -0400, Rich Felker wrote: > From: Rich Felker > Date: Fri, 2 Aug 2019 15:41:27 -0400 > Subject: [PATCH 14/15] switch all existing 32-bit archs to 64-bit time_t > > [...] > > diff --git a/include/sys/socket.h b/include/sys/socket.h > index 4ea7be1e..3db3cca3 100644 > --- a/include/sys/socket.h > +++ b/include/sys/socket.h > @@ -225,6 +225,13 @@ struct linger { > #endif > > #ifndef SO_RCVTIMEO > +#if __LONG_MAX == 0x7fffffff > +#define SO_TIMESTAMP 63 > +#define SO_TIMESTAMPNS 64 > +#define SO_TIMESTAMPING 65 > +#define SO_RCVTIMEO 66 > +#define SO_SNDTIMEO 67 > +#else > #define SO_RCVTIMEO 20 > #define SO_SNDTIMEO 21 > #endif > @@ -234,6 +241,7 @@ struct linger { > #define SO_TIMESTAMPNS 35 > #define SO_TIMESTAMPING 37 > #endif > +#endif > > #define SO_SECURITY_AUTHENTICATION 22 > #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 > -- > 2.21.0 > Somehow this got badly botched in rebasing. There's supposed to be versions of this conditional for both #ifndef's. I'm in the process of trying to factor this to two commits to avoid touching non-arch-specific bits in the switchover commit. If that works out ok I'll post a v3. Probably spending more effort on this than I should but I'd like a nice audit trail of how the change was logically made. Rich