Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Dec 2023 14:37:43 +0100
From:      tuexen@freebsd.org
To:        Dimitry Andric <dim@FreeBSD.org>
Cc:        Nuno Teixeira <eduardo@freebsd.org>, FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: devel/nspr: Fails to build on 1500008 5f71f9636efa
Message-ID:  <A96D2249-6CFE-4113-84EF-26AFAD79BBD8@freebsd.org>
In-Reply-To: <C5D01D64-82F6-4713-8156-1D3B68D2E1EA@FreeBSD.org>
References:  <CAFDf7U%2BxbTuhS7nUzeZgVknMPyyfYxuakFtrE4=h-1LtFK_Yig@mail.gmail.com> <9EE91B0D-6CFB-464E-AB9C-3A15D77D55FB@freebsd.org> <CAFDf7UJBY9a=SX_iTE2TOxK_r%2BaK1NDizMdebuYeaL6Zb89QbQ@mail.gmail.com> <CAFDf7ULcNYuD4ZAWXCjgbcWBbdmWw2b0O1vb9phqjXCP5VhpJA@mail.gmail.com> <C5D01D64-82F6-4713-8156-1D3B68D2E1EA@FreeBSD.org>

index | next in thread | previous in thread | raw e-mail

> On Dec 29, 2023, at 13:50, Dimitry Andric <dim@FreeBSD.org> 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.
Any preferred way? Maybe using __inline is the least intrusive way:
https://reviews.freebsd.org/D43231

Best regards
Michael
> 
> -Dimitry
> 
>> On 29 Dec 2023, at 13:30, Nuno Teixeira <eduardo@freebsd.org> wrote:
>> 
>> (...)
>> -ansi == Same as -std=c89
>> 
>> So it seems correct to remove it when -std=c99 is used.
>> 
>> Nuno Teixeira <eduardo@freebsd.org> 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)
> 



help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A96D2249-6CFE-4113-84EF-26AFAD79BBD8>