From nobody Fri Dec 29 13:07:52 2023 X-Original-To: freebsd-current@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 4T1lzj3LKQz564wv for ; Fri, 29 Dec 2023 13:08: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 4T1lzj0HD4z3Z99; Fri, 29 Dec 2023 13:08:00 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.17.1/8.17.1) with ESMTP id 3BTD7qkV083258; Fri, 29 Dec 2023 15:07:55 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 3BTD7qkV083258 Received: (from kostik@localhost) by tom.home (8.17.1/8.17.1/Submit) id 3BTD7qCq083257; Fri, 29 Dec 2023 15:07:52 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 29 Dec 2023 15:07:52 +0200 From: Konstantin Belousov To: Dimitry Andric Cc: Nuno Teixeira , tuexen@freebsd.org, FreeBSD CURRENT Subject: Re: devel/nspr: Fails to build on 1500008 5f71f9636efa Message-ID: References: <9EE91B0D-6CFB-464E-AB9C-3A15D77D55FB@freebsd.org> List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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-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:6939, ipnet:2001:470::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4T1lzj0HD4z3Z99 On Fri, Dec 29, 2023 at 01:50:34PM +0100, Dimitry Andric wrote: > The problem is really that our kernel headers (those under sys/) require C99. The only thing that https://cgit.freebsd.org/src/commit/?id=a8b70cf26030d68631200619bd1b0ad35b34b6b8 did was move two static inline functions from sys/netinet/tcp_var.h to sys/netinet/tcp.h, and it looks like the former header is never directly included by ports. The latter is, so those ports should be switched to C99, or the sys/netinet/tcp.h header should be fixed to use __inline instead. > netinet/tcp.h is required by POSIX, and as far as we support applications using C89, it must stay C89 compatible. But why userspace would need these newish accessors at all? IMO at least for userspace they do not add any value except additional namespace pollution. They should be hidden under #ifdef _KERNEL. > -Dimitry > > > On 29 Dec 2023, at 13:30, Nuno Teixeira wrote: > > > > (...) > > -ansi == Same as -std=c89 > > > > So it seems correct to remove it when -std=c99 is used. > > > > Nuno Teixeira escreveu no dia sexta, 29/12/2023 à(s) 12:03: > > > > > > > > I think we have two options: > > 1. Build the ports with a C version of at least C99. > > > > - Adding USE_CSTD=c99 > > - Removing -ansi: > > --- configure.orig 2023-12-29 11:54:11 UTC > > +++ configure > > - CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall" > > + CFLAGS="$CFLAGS $(DSO_CFLAGS) -Wall" > > > > Fix build. > > > > Notes: > > > > Adding USE_CSTD=c99 doesn't fix build by itself like we seen on some ports that were fixed by it. > > > > Something have changed from current 1500007 to 1500008. > > > > 2. Remove the inline from tcp_[gs]et_flags(). > > > > Best regards > > Michael > > > -- > > > Nuno Teixeira > > > FreeBSD Committer (ports) > > > > > > > > -- > > Nuno Teixeira > > FreeBSD Committer (ports) > > > > > > -- > > Nuno Teixeira > > FreeBSD Committer (ports) > >