From nobody Fri May 31 15:28:19 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VrRpb5Y2qz5N4Yh; Fri, 31 May 2024 15:28:23 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta002.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VrRpb3JLgz55LL; Fri, 31 May 2024 15:28:23 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id Cz6zsbET9drxED4B4sGBZa; Fri, 31 May 2024 15:28:22 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id D4B2sUMvV9Cr4D4B3sVbJw; Fri, 31 May 2024 15:28:21 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=etl8zZpX c=1 sm=1 tr=0 ts=6659ec95 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=TpHVaj0NuXgA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=hHJK3tccsECb7jr94p4A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A700299F; Fri, 31 May 2024 08:28:19 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 33B6597; Fri, 31 May 2024 08:28:19 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Warner Losh cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 676041c41ba5 - main - WPA: Allow CLOCK_BOOTTIME and CLOCK_MONOTONIC to #define the same In-reply-to: <202405311447.44VEl06w078151@gitrepo.freebsd.org> References: <202405311447.44VEl06w078151@gitrepo.freebsd.org> Comments: In-reply-to Warner Losh message dated "Fri, 31 May 2024 14:47:00 +0000." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 31 May 2024 08:28:19 -0700 Message-Id: <20240531152819.33B6597@slippy.cwsent.com> X-CMAE-Envelope: MS4xfHfS4t4LUf9qRBN7R+EYT7AVP88mcPSQpu4ObM4UtHN9uFLTbpOp43l7O+hR6RbKz4jU5BQcPjnOtaQ2blkBzWk5/sX+5gyRJiJGaOqCQowZb86DHePF rmUiZS/isrYkpu5vL/2i2HKRVFhOHVQalMq7m8K3GLQYJIyLraiHJF1KLbgbXrV4icy2OH8PY1kDTB20wYTITK5m0sximzaWvdDyYLAyptD+1d0SbKWk2tJF oSOWj7whSkPnHUyOMTRnB4TbmddF/5recs4s0c8qZrRHsD+T4d6Ja6zcJkZo2GfLppp7B98sx/a/rzjVz97DUd2twSs1LLtvADFKasdSS3o= X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4VrRpb3JLgz55LL In message <202405311447.44VEl06w078151@gitrepo.freebsd.org>, Warner Losh write s: > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=676041c41ba587285bb934aa2fca290e > a7208038 > > commit 676041c41ba587285bb934aa2fca290ea7208038 > Author: Warner Losh > AuthorDate: 2024-05-31 14:44:55 +0000 > Commit: Warner Losh > CommitDate: 2024-05-31 14:44:55 +0000 > > WPA: Allow CLOCK_BOOTTIME and CLOCK_MONOTONIC to #define the same > > Historically, these have been differnet values, and only one was defined > or they were defined as different values. Now that they are about to be > the same value, add #ifdef to cope. > > Sponsored by: Netflix > Reviewed by: olce, val_packett.cool, adrian > Differential Revision: https://reviews.freebsd.org/D45418 > --- > contrib/wpa/src/utils/os_unix.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/contrib/wpa/src/utils/os_unix.c b/contrib/wpa/src/utils/os_unix. > c > index 315c973f3228..a856179fb3b1 100644 > --- a/contrib/wpa/src/utils/os_unix.c > +++ b/contrib/wpa/src/utils/os_unix.c > @@ -72,7 +72,6 @@ int os_get_time(struct os_time *t) > return res; > } > > - > int os_get_reltime(struct os_reltime *t) > { > #ifndef __MACH__ > @@ -97,15 +96,21 @@ int os_get_reltime(struct os_reltime *t) > return 0; > } > switch (clock_id) { > -#ifdef CLOCK_BOOTTIME > +#if defined(CLOCK_BOOTTIME) Why this change? This could become a potential merge conflict next time WPA is MFVed. > case CLOCK_BOOTTIME: > clock_id = CLOCK_MONOTONIC; > break; > #endif > -#ifdef CLOCK_MONOTONIC > +#if defined(CLOCK_MONOTONIC) Ditto. > +/* > + * FreeBSD has both BOOTTIME and MONOTONIC defined to the same value, since > they > + * mean the same thing. FreeBSD 14.1 and ealier don't, so need this case. > + */ > +#if !(defined(CLOCK_BOOTTIME) && CLOCK_BOOTTIME == CLOCK_MONOTONIC) This I probably want to apply to the ports. > case CLOCK_MONOTONIC: > clock_id = CLOCK_REALTIME; > break; > +#endif > #endif > case CLOCK_REALTIME: > return -1; > -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0