From nobody Mon Mar 27 13:23:53 2023 X-Original-To: freebsd-git@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 4PlYS13pt8z41WgS for ; Mon, 27 Mar 2023 13:24:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PlYS10ffKz3sGx; Mon, 27 Mar 2023 13:24:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.17.1/8.17.1) with ESMTPS id 32RDNrQi046702 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 27 Mar 2023 16:23:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 32RDNrQi046702 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 32RDNrJH046701; Mon, 27 Mar 2023 16:23:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 27 Mar 2023 16:23:53 +0300 From: Konstantin Belousov To: Dimitry Andric Cc: Nuno Teixeira , freebsd-git Subject: Re: Getting __FreeBSD_version for a specific commit Message-ID: References: <8CEBB312-FCC1-4B52-99FB-1DE7F94028FB@FreeBSD.org> List-Id: Discussion of git use in the FreeBSD project List-Archive: https://lists.freebsd.org/archives/freebsd-git List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-git@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8CEBB312-FCC1-4B52-99FB-1DE7F94028FB@FreeBSD.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on tom.home X-Rspamd-Queue-Id: 4PlYS10ffKz3sGx X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Mon, Mar 27, 2023 at 01:29:17PM +0200, Dimitry Andric wrote: > On 27 Mar 2023, at 13:14, Nuno Teixeira wrote: > > > > I need to know what's the __FreeBSD_version for a stable/13 commit https://cgit.freebsd.org/src/commit/?h=stable/13&id=1dd126163b9448c2dcfe27978fee50649548437c so I can patch a port for, e.g, OSVERSION < 1301XXX. > > Go to: > > https://cgit.freebsd.org/src/tree/sys/sys/param.h?h=stable/13&id=1dd126163b9448c2dcfe27978fee50649548437c > > and look for the "#define __FreeBSD_version" line. In this case, it has value 1301511. Why not check the presence of the header directly?